qbasic.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LPOS Function
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Returns the number of characters sent to a printer since the last carriage
return was sent.
 
LPOS(n%)
 
    ■ n%    Indicates one of the printer ports:
              0 = LPT1, 1 = LPT1, 2 = LPT2, 3 = LPT3
Example:
    'This example requires a printer.
    LPRINT
    FOR i% = 1 TO 20
        LPRINT i%;
        IF LPOS(1) >= 10 THEN LPRINT     'Begin a new line.
    NEXT i%