Detecting where PRINT is going to print to
Root / Programming Questions / [.]
PtcguyCreated:
Locate doesn't work, since it will print the number starting at that point, regardless of pre-existing text. The prime numbers will be constantly increasing in size so I can't know beforehand how long they're going to be, although a simple function can take care of that. The disadvantage of using locate is that once I've reached the bottom of the screen, I can't shift up everything already on screen (if there is a way, please tell me) so I need to clear the whole screen, which makes pausing the program while it's running to see a whole screen of prime numbers rather difficult (especially with the low numbers).
You can tell how long a string is using LEN, and you can convert a number to a string using STR$. Also, LOCATE 0,29:PRINT will scroll the text screen up one line.
If you just use PRINT without LOCATE, it will automatically scroll everything else upwards - however, there's no way to scroll back up to see the earlier info.
I don't know what your needs are exactly, but if you need to generate a lot of data that you can then browse over at will, then you might consider writing into a PRG slot instead of printing to the screens. Take a look at PRGEDIT, PRGSET and PRGINS in the instruction list for more info.
There is a new command (called SCROLL I think) that can scroll printed text on the screen.
There is a new command (called SCROLL I think) that can scroll printed text on the screen.Indeed; Syntax: SCROLL A, B A=How many units the screen will move left or right, positive moving it right and vice versa B=How many units the screen will move up or down, positive moving it down and vice versa