03-25-2012, 07:13 PM
boriel Wrote:Thanks, sometime I dont see the forest because of all the trees...LCD Wrote:Just one small question. How to make Line Feed with Print with ZXBC?This was discussed in other thread I think. It was decided to use ' as a REM alternative, because it's widely extended and it's almost a standard (e.g. FreeBasic, Visual Basic, etc).
in Sinclair BASIC this worked:
But in ZXBC the '-Character is used for REM, and ยด and ` are illegal characters for the compiler.Code:Print "Line1" ' "Line2"
We concluded to use CHR$(13) instead. So use:
instead.Code:PRINT "Line1"; CHR$(13); "Line2"
But by replacing it with:
Code:
Print "Line1"+chr(10)+"Line2"
boriel Wrote:Thats right, it should put it at x=16,y=1. I checked it in emulator with two different strings.LCD Wrote:It looks also like I stepped on a bug in release 809 (maybe in earlier versions too:I will check it out. There were a complete PRINT work out some versions ago to fix a bug: Sinclair BASIC crashed upon exit or gave an error. Also it this change made the routine faster and shorter.
Code:Print at 0,0;"Spectrum users to celebrate the",,"30th birthday of our Speccy.";
the double coma should leave one line free, but in fact it prints the character "3" at Position x=31,y=1, where it should be position x=0,y=2.
Update: It should print the "3" at x = 16, y = 1!!! (execute it in Sinclair BASIC). And yes, it's bugged anyway.