3 - 33 3 - 33
MELSEC-Q
3 LET'S CREATE AND EXECUTE A PROGRAM
The following illustrates cases where "," (comma) is used.
Example
OK
A=100
OK
B=-50
OK
PRINT A,B,A+B
100 -50 50
14
characters
14
characters
OK
A$= " ABCD"
OK
B$= " EFGH"
OK
PRINT A$,B$,A$+B$
ABCD EFGH ABCDEFGH
14
characters
14
characters
BASIC manages one line on the screen by separating them into areas of 14
characters.
0
14
28
42
56
70
80
Area 1
Area 2
Area 3
Area 4
Area 5
Area 6
14 characters 14 characters 14 characters 14 characters 14 characters
14 characters
When commas are used as separators, the location where the next data will be
displayed in the beginning of the next area.
The BASIC operation (automatic display of spaces) when displaying numerical
numbers is the same as separating with ";" (semicolon).
3.10.1 Functions for displaying characters
There are two dedicated functions for the PRINT instruction.
(1) TAB Function
You can directly specify the number of characters from the left edge of the screen
of the current line with the TAB function. Use ";" (semicolon) to delimit the TAB
function.
Example
PRINT " A" ; TAB(12); " B" ; TAB (27) ; " C"
A B C
12 characters
27 characters