fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Home > lang > asc
 
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration   
Documentation
History
 
Asc
Syntax
Code = Asc ( Input AS String [ , Position AS Integer ] ) AS Integer

Returns 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 code greater than 128 have not the meaning they have with a charset like ISO_8859-1.

Examples

PRINT Asc("Gambas")

71
PRINT Asc("Gambas", 3)

109

See also

String Functions