Loop for-next taking only integer values (v1.0.1b2.44)
Oct 7, 2023 6:20:43 GMT -5
Post by adolfomartinfuentes on Oct 7, 2023 6:20:43 GMT -5
Hello everyone,
as part of a larger program I am experiencing problems with a simple for-next loop,
-- sample code begins --
010 FOR X = 0 TO 1 STEP 0.1
020 PRINT X
030 NEXT X
040 END
-- sample code ends --
as the variable X is taking only the limiting integer values 0 and 1, instead of the values 0, 0.1, 0.2, ..., 0.9, 1, as one would expect.
The issue is experienced in the free version of RunBASIC v1.0.1b2.44 for Mac OS X, as well as in the current online version.
Could anybody be of help?
Thank you very much!
Sincerely,
Adolfo
as part of a larger program I am experiencing problems with a simple for-next loop,
-- sample code begins --
010 FOR X = 0 TO 1 STEP 0.1
020 PRINT X
030 NEXT X
040 END
-- sample code ends --
as the variable X is taking only the limiting integer values 0 and 1, instead of the values 0, 0.1, 0.2, ..., 0.9, 1, as one would expect.
The issue is experienced in the free version of RunBASIC v1.0.1b2.44 for Mac OS X, as well as in the current online version.
Could anybody be of help?
Thank you very much!
Sincerely,
Adolfo