Returns a one character length BString whose ASCII or Unicode code is the argument.
[ sReturn = ] Chr ( nData )
The Chr procedure syntax has the following parts:
Name |
Type |
Description |
sReturn |
BString |
Result string |
nData |
Val Short |
ASCII code |
For values in the range of 0x00-0x7F,the function return a BString with the ASCII character.
For values in the range of 0x80-0xFF, the function translate the value using the system default code page.
For Values higher than 0xFF (256) the function assumes the value is a Unicode character and returns a BString with the Unicode character. Version 11/2021
The following examples shows converting an ASCII character and a Unicode character to a String or BString:
sRtn : String
bsRtn : BSting
bsRtn=Chr(65) !
bsRtn="A"L
bRtn=Chr('A') ! sRtn="A"
bsRtn=Chr(0xA74E) ! bsRtn="Ꝏ", Unicode character
sRtn=Chr('Ꝏ') ! sRtn="?",
(0x4E)