QBasic 1.1: LPOS Function
Explanation
LPOS Function
Returns the number of characters sent to a printer since the last carriage return was sent.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
Description / Parameter(s)
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%