Also,notethat Autowrapdoesn’tmovethe wholeword downto the next
line—that’sajob fora wordprocessor,not yourlaserprinter.
Pushing and popping the print position
Thisprovidesa wonderfulwayto keeptrackof theprintposition.it works
by lettingyoukeepa listof up to 20 printpositions.
Youcan“push”thecurrentprintpositionontothetop of thelist whenever
youwant.Later,youcan“pop”offwhateverpositionisatthetopofthelist,
makingit thecurrentprintposition.
When would you want to save and restore print positions this way?
Wheneveryouneedtointerruptwhatyou’reprintingnowtosticksomething
specialontothepage.Thisismosthandywhenyouneedtojump fromtext
to graphicsand back.
Sayyou’vewrittenoneroutinethatputsthepagenumberin thesameplace
on.evcrypage, and anotherthat under certain circumstancesprints two
heavyIincs.Youprintmcrnly alonguntilyouhaveto printthelines.You
thenpushthe currentprintpositionto executethe line-printingroutine.
Butpart waythroughthat you hit the page-numberspot.So youpush the
printpositionagainandrunthepage-numberroutine.Thenyoucanpopthe
printpositiontoprintthesecondline.Andwhenthat’sdoneyoupopitagain
to returnto printingtext.
As you mightsuspect,this can involvefairlycomplicatedprogramming,
typicallyusingthemacrocommandsdescribedlaterin thischapter.
To pushor pop a printpositionyousendthiscommand:
<ESC>&f n S
For n youenter Oto push(save)thecurrentprintposition,
or 1to pop (restore)thelastpositionsavedoff the list.
Note: The last positionpushedonto the list will alwaysbe the first onc
poppedbacklater.
69