Mitsubishi QD51 Programming Manual page 514

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
PRINT
Instruction
• Displays data on the screen.
PRINT [<data to be displayed>][;]
Syntax
data to be displayed
PRINT "ABC"
Examples
PRINT "ABC","DEF"
PRINT "ABC";"DEF"
• The PRINT instruction displays data on the screen.
Description
• Data is displayed on a console or terminal specified by the ZODV instruction.
• If <data to be displayed> is omitted, one line of blank space is displayed.
• A character string must be enclosed with double quotation marks (").
• The position where the value of <data to be displayed> is displayed is determined by the
symbol used to separate two items of <data to be displayed>.
In BASIC, one line is divided into areas, each of which contains 14 characters.
If two items of <data to be displayed> are separated by a comma (,), the second item of
<data to be displayed> is displayed starting from the beginning of the next area.
If two items of <data to be displayed> are separated by semicolon (;), the second item of
<data to be displayed> is displayed following the first character string in immediate
succession.
Note, however, that a comma (,) cannot be used to separate items of <data to be
displayed> unless the data is to be displayed on the console screen. An error occurs if a
comma is used.
Furthermore, if a space is used to separate items of <data to be displayed>, the same
result as when a semicolon is used will be obtained.
• If only a comma (,) is placed following the <data to be displayed> of the PRINT instruction,
the data of the next PRINT instruction is displayed starting from the next area. If only a
semicolon (;) is placed following the <data to be displayed>, the data of the next PRINT
instruction is displayed following the data of the previous PRINT instruction in succession.
• If no comma or semicolon is specified, a new line starts after the corresponding line is
displayed.
• If the line to be displayed exceeds the line width of the screen, the remaining data is
displayed in the next line.
• When a value is displayed, a blank space is always appended to it. In addition, a blank
space is placed immediately before a positive numeric value, and a negative sign (-) is
placed immediately before a negative numeric value.
11 - 344
PRINT
• • • •
• • • •
• • • •
• • • •
PRINT "ABC" ,
PRINT "DEF" ,
ABC
DEF
14
characters
characters
REMARK
See the LOCATE, PRINT USING, SPC and TAB instructions, and Section 3.10.
Specify the numeric values, numeric variables,
character strings, or character string variables to be
displayed.
Displays ABC.
Displays 14 characters starting with ABC, and then
14 characters starting with DEF.
Displays ABCDEF.
PRINT "ABC" ;
PRINT "DEF" ;
ABCDEF
14
MELSEC-Q
11 - 344

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents