11 - 390 11 - 390
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
TAB
Function
TABulate
• Moves the current character display position to the specified position.
TAB(<numeric expression>)
Syntax
numeric expression
• • • •
Specify the display position relative to the left side of
the screen.
Examples
PRINT TAB(10);
"MITSUBISHI"
• • • •
Displays "MITSUBISHI" from the 11th character.
MITSUBISHI
10 blank spaces
Description
• The TAB function displays space characters from the current character display position on
the screen to the character position indicated by <numeric expression>. If the current
character display position already exceeds the value in <numeric expression>, a new line
is started and the same operation is performed.
• The TAB function can be executed only to the screen on a console.
• The TAB function can only be used together with the PRINT and LPRINT instructions.
Program Example
10 ' This program displays character strings from the positions specified by the TAB function
20 A$="AD51H"
:
' Defines character strings
30 B$="BASIC"
40 PRINT TAB(5);A$;TAB(15);B$
:
' Displays the character strings from the 5th
and 15th position, respectively
50 END
RUN
AD51H BASIC
OK
REMARK
See the SPC and LOCATE functions, and Section 3.10.1.