base Full Description |
|
Syntaxstring-expression base numeric-expression. Purpose Used to convert a string representation of a non-decimal number into a numeric value. The first operand in the syntax is a string representation of the number in the specified base (octal, hexidecimal, etc.). Letters (either uppercase or lowercase) are used to represent digits higher than 9. For instance, hexidecimal (base 16) numbers consist of the digits "0123456789abcde". Octal numbers (base 8) consist only of "01234567". The second operand in the syntax is the radix, which must be between 2 and 36, inclusive. If a character in the string expression is not a valid digit in the specified base, an error occurs. For example, the expression "16a" BASE 10 would cause an error, because "a" is not a valid digit in the base 10 system. The following code illustrates the use of the find [digit | "ABCDEFabcdef"]+ => hex-location local counter location set location to hex-location base 16 |