Retreiving number of lines left on current page (sys.LinesLeft)

!temp sys.LinesLeft,,u4

Lines left on current page

The number of lines left on the current page. Cannot be updated. The value of sys.LinesLeft is used to determine whether to throw a new page when a need statement is encountered, and to determine when to execute the !footnote statements.

The page length is stored in the system variable sys.PageLength.

Note: Since Sculptor version 6.1.6 sys.LinesLeft is now calculated by a more accurate method, based on the size of the current font and the space left on the page. It’s possible that a few old programs rely on the old, incorrect calculation and will no longer start a new page at the required line. In this happens, force the program to revert to the old behaviour by using !compat linesleft=5


EXAMPLE

!on starting cc_cat {
    print
    if (sys.LinesLeft < 7) then newpage
}