Asc()

Returns the numeric value of the first byte or UTF-16 code unit in the specified string.

Number := Asc(String)

매개변수

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). 자세한 것은 Unicode vs ANSI를 참조합니다. If String is empty, it returns 0.

논평

This function is equivalent to Transform, OutputVar, Asc.

유니코드 보충 문자를 허용하려면, 대신에 Ord(String)를 사용하십시오.

Transform, Ord(), Chr()

예제

Both message boxes below show 116, because only the first character is considered.

MsgBox, % Asc("t") 
MsgBox, % Asc("test")