Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IDE bug?
#1
I tried the program UDG.bas in the examples folder.

When I try to change the BIN values and run the program one of the numbers is removed from each BIN statement,

e.g.
0 DATA BIN 1111,BIN 1011,BIN 1011,BIN 1011,BIN 1011,BIN 1011,BIN 1011,BIN 1111
becomes:
DATA BIN 111,BIN 011,BIN 011,BIN 011,BIN 011,BIN 011,BIN 011,BIN 111
Reply
#2
There's no "UDG.bas" program in the standard distribution. Maybe you did' download the example from another site?
The program "snake.bas" uses an UDG, by the way.

Unfortunately DATA is not yet supported (READ, DATA, RESTORE are a waste of space :!: but will be supported in the next release). You should use a DIM array as explained in a previous post.

BIN 1111 can be written as 1111b. See <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Syntax#Numbers">http://www.boriel.com/wiki/en/index.php ... ax#Numbers</a><!-- m --> ZX BASIC support binary and hexadecimal values using b and h suffixes.
Anyway BIN is to be implemented in this release (1.2.7) about to be published to allow better compatibility with old BASIC listings. BIN allows up to 16 [0|1] digits constants, so it's a 16 bit value.
Reply
#3
ah yes I must have the old version from world of spectrum, thanks for the help
Reply
#4
I myself still prefer to use the prefix for binary data: %01100011 is the same as 01100011b or BIN 01100011
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)