CHR
Return the character corresponding to ASCII code.
WebVue support - Yes.
Syntax
StrVal = CHR(AsciiCode);
Return type: STR.
Argument |
Meaning |
AsciiCode |
The ASCII code that is to be converted. Any numeric type. |
Execution
A character is returned corresponding to an ASCII code in the range 0 to 255. Outside of that range, modulus 256 is used.
Example
SUB Main()
DIM intCharCode as integer;
DIM strChar as Str;
'ASCII code - Integer type
intCharCode = 97;
strChar=Chr(intCharCode);
PRINT ("ASCII code 97 corresponds to:", strChar);
'Displays "ASCII code 97 corresponds to: a"
END SUB