Help Center›FreeBASIC
LPosfunction
Returns the number of characters sent to the printer port in the last LPrint statement.
Syntax
Declare Function LPos ( ByVal printer As Long ) As Long
Parameters
| Name | Description | |
|---|---|---|
printer | Either 0, 1, 2 or 3. Represents the printer port (LPT#) |
Return value
Returns the number of characters sent.
Description
Used to determine, from the last
LPrint, how many characters were sent to the printer port.Remarks
Usage
result = LPOS(printer)
Differences from QB
- None
See also
Example
' compile with -lang fblite or qb
#lang "fblite"
Dim test As String = "LPrint Example test"
Print "Sending '" + test + "' to LPT1 (default)"
LPrint test
Print "LPT1 last recieved " + Str(LPos(1)) + " characters"
Print "String sent was " + Str(Len(test)) + " characters long"
Sleep
Reference
- Documented in KeyPgLpos.html