![]() |
|
Array FLOAT only works if global (solved) - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://forum.boriel.com/forumdisplay.php?fid=15) +---- Thread: Array FLOAT only works if global (solved) (/showthread.php?tid=2505) |
Array FLOAT only works if global (solved) - zarsoft - 2023-11-14 This program only works if the array is global. Is this supose to work like this? Code: SUB Test
DIM T(3) AS FLOAT => {0.5,1.5,2.5,3.5}
PRINT
FOR i = 0 TO 3
PRINT "T(";i;")= ";T(i)
NEXT i
T(0) = 0.5
T(1) = 1.5
T(2) = 2.5
T(3) = 3.5
PRINT
FOR i = 1 TO 3
PRINT "T(";i;")= ";T(i)
NEXT i
PAUSE 0
END SUB
TestRE: Array is global - boriel - 2023-11-14 No. It should work also with local arrays. I'll check it. RE: Array is global - zarsoft - 2023-11-14 Works with LONG but does not work with FLOAT. RE: Array is global - boriel - 2023-11-24 Try this beta and let me know if it works: http://www.boriel.com/files/zxb/zxbasic-1.17.2-beta5.tar.gz http://www.boriel.com/files/zxb/zxbasic-1.17.2-beta5.zip http://www.boriel.com/files/zxb/zxbasic-1.17.2-beta5-win32.zip http://www.boriel.com/files/zxb/zxbasic-1.17.2-beta5-linux64.tar.gz http://www.boriel.com/files/zxb/zxbasic-1.17.2-beta5-macos.tar.gz RE: Array is global - zarsoft - 2023-11-25 Works, thanks. |