Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Negative STEP does not work (*solved*)
#1
Hi Boriel, I just trying to write some stuff in ZX Basic compiler 1.1.0, but I ran into some problems:
Code:
x=0
if x=1 then
  print "1"
else if x=0 then
  print "0"
end if

I got the message "Unexpected end of file", so if it is a part of FOR NEXT Loop, I got the message "Unexpected Token 'NEXT' <NEXT>". ELSE alone works, but I was sure, ELSE IF should work too, Or maybe I'm wrong?

Another one: the program does not accept Exponents: 2e4 (=2000) or similar.
And finally:
Negative STEP does not work with integers or long, only with floats or byte:
Code:
dim x as integer

for x=7 to 1 step -1
  print x
next x

The compiler is otherwise fantastic! Please continue your great work!
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)