Forum
Error: Invalid file name (solved) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: Error: Invalid file name (solved) (/showthread.php?tid=2352)



Error: Invalid file name (solved) - zarsoft - 03-17-2023

This code gives an error:
"F Invalid file name"

Code:
SUB SaveImage
DIM size AS LONG
size = 192*32+32*24
SAVE "image" CODE 16384,size
END SUB

SUB Run
SaveImage
END SUB

Run



RE: Error: Invalid file name - boriel - 04-04-2023

It's a bug. Let me fix it.
In the meantime, declare the size variable of type UInteger, and it will work.
You can also use SAVE "image" SCREEN$ as in Sinclair BASIC.

EDIT: better try this beta which fixes this bug:
http://www.boriel.com/files/zxb/zxbasic-1.16.5-beta11.tar.gz
http://www.boriel.com/files/zxb/zxbasic-1.16.5-beta11.zip
http://www.boriel.com/files/zxb/zxbasic-1.16.5-beta11-win32.zip
http://www.boriel.com/files/zxb/zxbasic-1.16.5-beta11-linux64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-1.16.5-beta11-macos.tar.gz


RE: Error: Invalid file name - zarsoft - 04-05-2023

Thanks