XavSnap wrote: ↑Fri Apr 24, 2020 5:33 pm
Code: Select all
10 FOR A=1 TO 44
10 PRINT AT 0,0;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
20 PRINT AT 1,0;"\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
30 PRINT AT 0,0;"%H%O%W% %A%R%E% %Y%O%U% %T%O%D%A%Y% %?";TAB NOT PI;"%?";TAB NOT PI;
Don't know how you came up with the first image but your first program gave me the second image.
Note that I'm not looking for a work around. I'm trying to understand why ZX81 BASIC is doing that? It seems to be a bug, no? Why else put a blank space there. It somehow decides to print a blank space, likely to move the internal column pointer ahead by 1 so the next time it computes the "," it can add 16 and sees that it's greater than that. In my ZX81 BASIC clone (ZXSimulator which is only for the QL) I just set the internal column pointer to 0 (and increment row) if greater than 15 otherwise it's 16 and get the same effect when non-inverse and so I don't have this artifact. Do I want to be byte-for-byte (bug) compatible or has someone fixed this bug in updated ROM releases that speed things up, etc...
My question is, what is the use of putting a space after the commas each time (other than lazy internal way to keep column calculations on track)? After the comma you cannot print any text after it as it lands either on 0 or 16.
Note it even is an issue in non-inverse. In the bottom two examples it kind of messes up text (in the second one) that you'd like not to mess up. And yes, there are work around but just trying to understand the reason for why comma works that way:
This works
Code: Select all
10 PRINT AT 0,0;"HOW ARE YOU TODAY?"
30 PRINT AT 0,1;"%O"
This deletes the "W"
Code: Select all
10 PRINT AT 0,0;"HOW ARE YOU TODAY?"
30 PRINT AT 0,1;"%O",
So you may find this example useless but what if I create a display and I want to replace a pair of repeating numbers in a tabular display and they are in 0th and 16th column and there is text between and after them. Using the tabular comma would make the most sense. Or in my case, I was using it to move a line of text over three lines by using the "," in four successions which made it convenient in a single PRINT statement. When I inversed the screen all of a sudden the white spaces appeared so I had to use two PRINT statements (could have used TAB but haven't implemented it yet in ZXSimulator since I only recently realized it existed :-/).