First, thanks a lot for the great work, it’s just amazing !
Like you, I have fond memories of the computer of the 80s (The ZX Spectrum in my case) and was looking for a language to teach my kids programming.
We wrote simple programs, and we were considering writing a more complex one that we had in mind, when we realized that there’s currently no way (correct me if I’m wrong) to store some program’s data on disk.
Hence this feature request.
To explain it, let’s say that among the variables of the program, you want to persist three variable's values : my_string$, valid? and my_array
This could be done with the command :
SAVEDATA “filename.ext” FROM my_string$, valid?, my_array
The file filename.ext would then be created/overwritten with the values, stored as text.
Likewise, to load data at any point in the program, you would do
LOADDATA “filename.ext” TO my_string$, valid?, my_array
Provided of course, that the file exists, the variables have been declared before (and that the types match). Otherwise LOADDATA would raise an error.
Hope all of this makes sense, and it's something you might consider adding to the language.
Again, thank you for EndBasic !
First, thanks a lot for the great work, it’s just amazing !
Like you, I have fond memories of the computer of the 80s (The ZX Spectrum in my case) and was looking for a language to teach my kids programming.
We wrote simple programs, and we were considering writing a more complex one that we had in mind, when we realized that there’s currently no way (correct me if I’m wrong) to store some program’s data on disk.
Hence this feature request.
To explain it, let’s say that among the variables of the program, you want to persist three variable's values : my_string$, valid? and my_array
This could be done with the command :
SAVEDATA “filename.ext” FROM my_string$, valid?, my_arrayThe file
filename.extwould then be created/overwritten with the values, stored as text.Likewise, to load data at any point in the program, you would do
LOADDATA “filename.ext” TO my_string$, valid?, my_arrayProvided of course, that the file exists, the variables have been declared before (and that the types match). Otherwise LOADDATA would raise an error.
Hope all of this makes sense, and it's something you might consider adding to the language.
Again, thank you for EndBasic !