04-20-2016, 03:45 PM
BASIN has its own codes. ZX BASIC is a compiler, so it tries to guess some (a few of them!) at compile time. NOT at runtime.
It's much faster if you use the ink code which is CHR(16) (Read here).
So instead of
use
Actually, CHR$ is optimized for several chars at once. So CHR$(x) + CHR$(y) + CHR$(z) + ... can be written as CHR$(x, y, z, ...). Example:
Give it a try. Also, in this case, you can ignore the INT( )... because CHR$ will take only INT args and do it for you.
Tell me is this work for you :roll:
It's much faster if you use the ink code which is CHR(16) (Read here).
So instead of
Code:
p$="{\i" + x$ + "}X"
Code:
p$=CHR$(16) + i$ + "X";
Actually, CHR$ is optimized for several chars at once. So CHR$(x) + CHR$(y) + CHR$(z) + ... can be written as CHR$(x, y, z, ...). Example:
Code:
p$ = CHR$(16, INT(RND * 7), CODE "X")
Tell me is this work for you :roll: