Contents | Index | < Browse | Browse >
7.9. Conversion Routines
The following routines perform conversions between
strings and numbers.
$str ( $str num ) -> Returns a volatile string which con-
tains the ASCII representation of num.
Example:
($str 3) is the string "3"
$num ( $num str ) -> Returns the numeric value of str.
Example:
($num "234") is the number 234
$ord ( $ord str ) -> Returns the ASCII code of the first
character in str.
Example:
($ord "ABC") is 65
$chr ( $chr num ) -> Returns a volatile string which con-
tains exactly one character, whose ASCII code is
num.
Example:
($chr 97) is the string "a".