suve

awful: function: ord

Declaration

int :ord ( string $CHAR )

Summary

Returns the ASCII codepoint of the first character in given string.

Example

# Translate a character to a number.
:set &CHAR s''
:set &CHAR :getchar
:writeln s'ord(' $CHAR s') = ' :ord $CHAR

wikipage modified on 2014/0601/2317