Returns the numeric value of the first byte or UTF-16 code unit in the specified string.
Number := Asc(String)
The string whose numeric value is retrieved.
This function returns a numeric value in the range 0 to 255 (for ANSI) or 0 to 0xFFFF (for Unicode). See Unicode vs ANSI for details. If String is empty, it returns 0.
This function is equivalent to Transform, OutputVar, Asc
.
To allow for Unicode supplementary characters, use Ord(String) instead.
; Both message boxes below show 116, because only the first character is considered. MsgBox, % Asc("t") MsgBox, % Asc("test")