Omron SYSMAC C200H-ASC02 Operation Manual page 58

Ascii unit
Hide thumbs Also See for SYSMAC C200H-ASC02:
Table of Contents

Advertisement

BASIC Language
PRINT/ LPRINT USING
Statement
48
LPRINT
<port> is an integer (1 or 2).
<list of exp> can be numeric or character expressions. Character
expressions should be enclosed in double quotation marks.
Example:
PRINT #1,A,B$;"BASIC"
Remarks:
The list of expressions must be separated by commas, semicolons, or
blanks. When the expressions are separated with blanks or semicolons, the
next value is output immediately after the preceding value. When the expres-
sions are separated with commas, the values are output at intervals of nine
characters.
If the list of expressions is not terminated with a semicolon, a carriage return
is appended after the last expression.
If numeric expressions are used, a blank is output before and after the resul-
tant value. The blank before the value is used for a minus sign, if one is re-
quired.
If <list of exp> is omitted, execution of this statement causes a carriage re-
turn to be output.
If the port specification is omitted, port 1 is assumed for the PRINT state-
ment, and port 2 for the LPRINT statement.
The LPRINT statement outputs data under control of the device connected to
port 2, irrespective of the OPEN statement directives.
Purpose:
To output strings or numbers according to a specified format
Format:
PRINT [#<port>,] USING "<format>"; <list of exp>
Example:
PRINT #1, USING "####,# \\###";A;B
Remarks:
The following characters control the format of the output:
!
Outputs the first character only.
& &
Outputs the characters enclosed by &.
@
Outputs the corresponding character string.
#
Outputs the corresponding character string.
.
Inserts a decimal point at any desired place.
+
Places a plus sign before and after a numeric value.
-
Places a minus sign before and after a numeric value. (Write this
character at the end of the format character string.)
**
Places two asterisks in the blank, upper digit positions of a numeric
value.
\\
Places one \ in the blank digit position immediately before a numeric
value.
**\
Combines the functions of ** and \\.
,
Delimits an integer at every third digit position from the right.
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents