$SetP: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (Mlarocca moved page $SETP to $SetP: Lower case change)
 
(No difference)

Latest revision as of 18:55, 29 July 2014

This function sets the current page number for the output device currently in effect. The current page number is used by Model 204 in formatting HEADER 0 or filling in a value for the $HPAGE function. The value specified as the $SETP argument becomes the current page number. Note, however, that the current page number is incremented before the next page is printed, so if you want the next page to be page 5, use 4 as the argument to $SETP as shown in the following example:

%PAGENO = $SETP(4) SET HEADER 1 $HPAGE(%PAGENO)

The first line in the example is sufficient for setting the page number in HEADER 0. If you want the page number to appear in any other header line, you must do it indirectly (using the $HPAGE function), as in the second line of the example. The $SETP function is not valid in a SET HEADER statement.

Although the effect of $SETP is to set the current page number, its return value is a number representing the current number of output lines per page (the value of the OUTLPP parameter or, if an alternate output device is being used, the UDDLPP parameter). This is the value you would see if you printed the value of %PAGENO in the example (not the current page number).