Returns the character associated with the specified numeric ANSI code.
CHR(nANSICode) |
Parameters
- nANSICode
- Specifies a number between 0 and 255 whose equivalent ANSI character CHR(В ) returns. Use ASC(В ) to return the ANSI value for a specified character.
Return Value
Character
Remarks
CHR(В ) returns a single character corresponding to the numeric position of the character in the character table of the current code page. CHR(В ) can be used to send printer control codes to a printer.
Example
The following example displays the numbers 65 through 75 and uses CHR(В ) to display their corresponding character values A through K.
В | Copy Code |
---|---|
CLEAR FOR nCOUNT = 65 TO 75 ? nCount && Display numeric value ?? ' ' + CHR(nCount) && Display character ENDFOR |