Asc - Built-in String Function¶
Purpose¶
Asc returns the Unicode character code of the first character in a string.
Syntax¶
Asc(str)
Arguments¶
| Argument | Required | Description |
|---|---|---|
str |
Yes | Any valid string expression. |
Returns¶
Variant with an integer (VT_I4 or VT_I8) value
Example¶
Return Asc("a") // returns 97
Return Asc("✔") // returns 10004
Return (Asc (Lcase (Left ({Customer.Name},1)))) // depending on first character of customer name
See Also¶
Notes¶
- When
strcannot be converted to a string, a runtime error is generated.