Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array FLOAT only works if global (solved)
#1
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

Test
Reply
#2
No. It should work also with local arrays.
I'll check it.
Reply
#3
Works with LONG but does not work with FLOAT.
Reply
#4
Try this beta and let me know if it works:
http://www.boriel.com/files/zxb/zxbasic-...ta5.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...-beta5.zip
http://www.boriel.com/files/zxb/zxbasic-...-win32.zip
http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz
Reply
#5
Works, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)