Ord() [v1.1.21+]

Returns the ordinal value (numeric character code) of the first character in the specified string.

Number := Ord(String)

매개변수

String

The string whose ordinal value is retrieved.

반환 값

This function returns the ordinal value of String, or 0 if String is empty. If String begins with a Unicode supplementary character, this function returns the corresponding Unicode character code (a number between 0x10000 and 0x10FFFF). Otherwise it returns a value in the range 0 to 255 (for ANSI) or 0 to 0xFFFF (for Unicode). 자세한 것은 Unicode vs ANSI를 참조합니다.

논평

Apart from the Unicode supplementary character detection, this function is identical to Asc().

Asc(), Chr()

예제

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

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