PickBASIC / FlashBASIC
char() function
.mdThe char() function converts a number between 0 and 255 to its corresponding ASCII character equivalent.
␣Look up any code 0–255 in the Character Codes chart: the character, hex, binary, and the D3 marks (AM, VM, SVM).→Syntax
char(num.exp)Parameter(s)
| num.exp | Number between 0 and 255 to be converted to the corresponding ASCII character equivalent. Numbers over 255 are adjusted into the range 0 to 255 by taking the number modulo 256. |
Description
Note: The arguments in the char() function must be numeric otherwise the [b16] run-time warning message displays.
Example(s)
This causes the terminal to beep once.
crt char(7)
This concatenates an escape with a k and assigns it to string.
string = char(27):"k"
This creates a constant at compile time to reference attribute marks.
equ am to char(254)
ASCII code to its character
print char(65) ;* A
Lowercase letter from its code
print char(97) ;* a
See also
Referenced by
3 topics mention char() function in its description.