DIV ARENA FORUMS

Loading and saving ASCII textfiles?

RKSoft - 6-5-2017 at 01:45 PM

There is the FOPEN...FCLOSE statement to load/save files. And there is the LOAD and SAVE statement. When i save variables, strings etc. i cannot read the file with a text editor. Is there a possibility? Or can you add a function for such a feature, please?

CicTec - 6-5-2017 at 03:24 PM

Hello RKSoft,

DIV (FOPEN, FWRITE, etc ...) functions save by default only in binary mode and work in reverse with respect to their equivalents in C/C++, adding support now is quite difficult without breaking compatibility with DIV2 programs.

RKSoft - 7-5-2017 at 01:54 PM

Why not add the statements TOPEN/TCLOSE (Text Open/Close) for ASCII textfiles?

CicTec - 8-5-2017 at 10:30 AM

Adding new names of features that do almost the same things as others is not a good design choice for the API of a language. Also, as mentioned several times, DIV3 needs complete modernization, adding features now and then deleting them again would only create difficulties for users.

I think for now the best solution is to make the current version as stable as possible, and once we have the time (especially Mike) for the new version, we will see what the new DIV standard will be.


Why do you need a text file? with FWRITE/FREAD you can still save / read text strings even if you save them in binary form.

RKSoft - 8-5-2017 at 03:33 PM

When i make a level with my level-tileset-editor or make a based like game with tileset i can convert made games from Blitz Basic to DIV DX easier. But this feature isn't really important at this moment, really! How you said, the important priority is to stable and fix the current DIV DX build.

Big thanks to you for making this possible in your spare time!