11 - 20 11 - 20
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
CHR$
Function
CHaRacter $
• Returns a character whose character code is the value of the arithmetic expression.
CHR$ ( <arithmetic expression> )
Syntax
arithmetic expression
• • • •
Specify the character code to get a character.
Examples
PRINT CHR$ (&H41)
• • • •
Displays A whose character code is 41.
Description
• CHR$ function returns a character whose character code is the numeric value specified by
<arithmetic expression>.
Specify the arithmetic expression by 0 through 255 (&H00 through &HFF).
• Normally, the CHR$ function is used in order to display a special character.
• For converting from a character to a value, see the ASC function.
Program Example
10 ' Displays characters of character code from &H41 to &H5A.
20 FOR I=&H41 TO &H5A
:
' Repeats from &H41 to &H5A
30 PRINT CHR$(I);" ";
:
' Displays a character
40 NEXT I
50 END
RUN
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
OK
REMARK
See the ASC function.
Содержание 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...