11 INSTRUCTIONS AND FUNCTIONS
CHR$
Function
• Returns a character whose character code is the value of the arithmetic expression.
CHR$ ( <arithmetic expression> )
Syntax
arithmetic expression
PRINT CHR$ (&H41)
Examples
• CHR$ function returns a character whose character code is the numeric value specified by
Description
<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
30 PRINT CHR$(I);" ";
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
11 - 20
CHaRacter $
• • • •
• • • •
REMARK
See the ASC function.
Specify the character code to get a character.
Displays A whose character code is 41.
:
' Repeats from &H41 to &H5A
:
' Displays a character
MELSEC-Q
11 - 20