![]() |
Line Feed and ",," bug (*solved*) - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15) +---- Thread: Line Feed and ",," bug (*solved*) (/showthread.php?tid=445) |
Line Feed and ",," bug (*solved*) - LCD - 03-25-2012 Just one small question. How to make Line Feed with Print with ZXBC? in Sinclair BASIC this worked: Code: Print "Line1" ' "Line2" It looks also like I stepped on a bug in release 809 (maybe in earlier versions too: 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. Re: Line Feed and ",," bug - boriel - 03-25-2012 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). We concluded to use CHR$(13) instead. So use: Code: PRINT "Line1"; CHR$(13); "Line2" 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. Update: It should print the "3" at x = 16, y = 1!!! (execute it in Sinclair BASIC). And yes, it's bugged anyway. Re: Line Feed and ",," bug - LCD - 03-25-2012 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). 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. Re: Line Feed and ",," bug - boriel - 03-25-2012 I think I have fixed it. Can you download an check 1.2.9-s815, please? Try and tell me ![]() Re: Line Feed and ",," bug - LCD - 03-26-2012 boriel Wrote:I think I have fixed it.Jose, you are really fast... I will check it when I'm back at home. So my next game is on the way, I think ![]() Edit: Checked it, this bug is fixed! |