Asc

Code = Asc ( Input [ , Position ] )

Return the ASCII code of the character at position Position in the string Input.

If Position is not specified, the ASCII code of the first character is returned.

Be careful! Gambas uses the UTF-8 charset internally, so character codes greater than 128 do not have the same meaning as a charset like ISO_8859-1.

Examples

Print Asc("Gambas")
71

Print Asc("Gambas", 3)
109

See also