Post by Isaac Joshua ChuaHi guys! I would like to know if it is possible to go back to the previous line in report and print again on that line. I have a program that needs that function.
PRINT COLUMN 03,"Hi there"
*go back previous line*
PRINT COLUMN 12,"Jerry"
From memory I don't think there's provision for this. You should
really work out all what has to go on the line before you print it.
Alternatively you could follow the approach that works for backspaces.
Embed the ASCII code for line up (possibly CTRL-K), print your text and
then embed the ASCII code (CTRL-J) for line down.
The line counting code which determines when to throw a new page won't
take into account what you've done.
Say you're on line 2 when you print your "Hi there". At the end of that
statement the printer will move to line 3 and the line count will be
updated to 3.
If you then put in another PRINT to issue the ASCII for line-up
(terminating the line with a semi-colon to suppress the normal end of
statement line throw) the printer will be physically on line 2 again but
the line count will still be at 3.
Your next statement to print "Jerry" as you show it will print the word,
throw a newline which will move the printer back down to the start of
line 3 and increment the line count to 4. The line count will then reach
the end of page line count and throw a new page whilst the printer is
physically one page above.
So the best way to do this is:
PRINT COLUMN 03,"Hi there"
PRINT {line up sequence} COLUMN 12,"Jerry" {line down sequence}
That way the whole printer juggling takes place within the one
statement. The line count code and actual count are in sync when the
statement completes. What happens in the middle of the statement stays
in the middle of the statement ;)
--
Ian
The Hotmail address is my spam-bin. Real mail address is iang
at austonley org uk