
7-6
Section
Details of BASIC Commands
172
lprint
Syntax:
LPRINT
[# <port expression>][
USING
“<print format>”;] <expression>{(,|;|<space>)<expression>}
Description:
Statement. Outputs data or text to a communications port. The device will be the LPRT regardless
of the settings in the
OPEN
command.
Remarks:
<port expression> is an expression returning an integer in the range: [1 or 2].
<expression> is any valid numerical or character expression.
If the <expressions> are separated by semicolons or spaces, and no formatting is used, they are
output one immediately after the other on the output. If they are separated by commas, they are
output with a tab character separating them on the output stream.
If the terminating comma, or semicolon, is omitted a carriage return is appended at the end of the
output.
All numerical expressions are output with a space character either side of the expression. The
space before the numerical expression can be used for an optional minus sign.
If no expressions are specified this statement outputs a carriage return on the output.
An optional format string can be used by applying the
USING
statement. The <print format> string
is a string expression containing the following control characters.
When specifying several expressions, the format for each expression must be separated by a
space. If there is no space, expression may not be output in the correct format.
Format type
Code
Description
!
Prints only the first character of a string.
&&
Prints the first n characters, where n is the number of blanks
enclosed between & plus 2.
String
@
Prints the corresponding character string.
#
Indicates a digit position.
.
Inserts a decimal point at any desired place
+
Specifies the position of the sign of the numeric value.
-
If specified at the end of the numeric value it specifies that the
sign for negative numbers is suffixed to numeric value.
**
Fills the left-most unused positions of the numeric value with *.
Also if - is specified at the end of a number then * will fill the
sign position if the value is positive.
\\
Prefixes \ at the beginning of the numeric value. \ allocates
space for one digit position.
**\
A combination of ** and \\.
,
Separates the integer portion of a numeric value by a comma
every three digits from the right of the integer part.
^^^^
When specified at the end of a numeric field it specifies that
exponential format should be used. The exponential format is
(E+nn,D+nn).
^^^^^
When specified at the end of a numeric field it specifies that
specification format should be used. The specification format is
(E+nnn,D+nnn).
Numerical
_
Allows the printing of the above special characters in the format
string. If the special character is preceded by the ‘_’ it is printed
as normal.
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...