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
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...