code-from-char(a, [list b, [mode c]] )
Group |
The function returns the numerical Unicode value of the first character in parameter a as an Integer value. If parameter a contains more than one character, it is possible to specify a list object in parameter b, which receives the codes of all the characters in a. The display mode of the character codes in the list can be set in parameter c.
Parameter Description
Parameter |
Description |
a |
String containing one or more characters. Note: If empty, the return value of the function is 0 and the list b remains empty. |
b |
(optional) Name of a list object to receive the codes of all characters from parameter a. Note: The list is emptied at the beginning. |
c |
(optional) Display mode of the character codes in list b. Possible values are i, u, x (corresponds to Integer/Unicode/hexadecimal). In mode i the list values have data type Integer, for all other modes the data type is String. Default: i. |
Examples
Parameter a |
Parameter b |
Parameter c |
Return Value |
Values in List b |
Data Type in List b |
|
|
|
0 |
|
|
A |
|
|
65 |
|
|
A |
list1 |
|
65 |
65 |
Integer |
B |
list1 |
|
66 |
66 |
Integer |
C |
list1 |
|
67 |
67 |
Integer |
ABC |
list1 |
|
65 |
65,66,67 |
Integer |
€ |
list1 |
|
8364 |
8364 |
Integer |
10 € |
list1 |
|
49 |
49,48,32,8364 |
Integer |
10 € |
list1 |
i |
49 |
49,48,32,8364 |
Integer |
10 € |
list1 |
x |
49 |
0x31,0x30,0x20,0x20ac |
String |
10 € |
list1 |
u |
49 |
\u0031,\u0030,\u0020,\u20ac |
String |