Original Author Paul Laughton, 2011
Page 61
De Re BASIC!
LEN(<sexp>)
Returns the length of the <sexp>.
HEX(<sexp>)
Returns the numerical value of the string expression <sexp> interpreted as a hexadecimal integer. The
characters of the string can be only hexadecimal digits (0-9, a-h, or A-H), with an optional leading sign
("+" or "-"), or the function generates a runtime error.
OCT(<sexp>)
Returns the numerical value of the string expression <sexp> interpreted as an octal integer. The
characters of the string can be only octal digits (0-7), with an optional leading sign ("+" or "-"), or the
function generates a runtime error.
BIN(<sexp>)
Returns the numerical value of the string expression <sexp> interpreted as a binary integer. The
characters of the string can be only binary digits (0 or 1), with an optional leading sign ("+" or "-"), or the
function generates a runtime error.
SHIFT(<value_nexp>, <bits_nexp>)
Shifts the value <value_nexp> by the bit count <bits_nexp>. If the bit count is < 0, the value will be
shifted left. If the bit count is > 0, the bits will be shifted right. The right shift will replicate the sign bit.
The double-precision floating-point value are truncated to 64-bit integers before the operation.
ASCII(<sexp>{, <index_nexp>})
Returns the ASCII value of one character of <sexp>. By default, it is the value of the first character. You
can use the optional <index_nexp> to select any character. The index of the first character is 1.
A valid ASCII value is between 0 and 255. If <sexp> is an empty string ("") the value returned will be 256
(one more than the largest 8-bit ASCII value). For non-ASCII Unicode characters, ASCII() returns invalid
values; use UCODE() instead.
UCODE(<sexp>{, <index_nexp>})
Returns the Unicode value of one character of <sexp>. By default, it is the value of the first character.
You can use the optional <index_nexp> to select any character. The index of the first character is 1.
If <sexp> is an empty string ("") the value returned will be 65536 (one more than the largest 16-bit
Unicode value). If the selected character of <sexp> is a valid ASCII character, this function returns the
same value as ASCII().
IS_IN(<sub_sexp>, <base_sexp>{, <start_nexp>})
Returns the position of an occurrence of the substring <sub_sexp> in the base string <base_sexp>.