Chapter 6 RAPID!
Functions
188 WCDMA Options Version 6.20
VAL$
String functions This subsection describes functions that operate on strings.
Note: In case uninitialized variables are used as arguments, the returned values
will usually be empty strings or ‘0’.
ASC
Syntax
VAL$(aNumber [, digits ])
Parameters
aNumber is a numeric expression.
digits is a numeric expression, resulting in a positive
integer.
Description
Returns a string containing the numeric representation
of
aNumber.
The number of decimal places may be specified using the
optional
digits command element.
In case
aNumber uses more decimal places than speci-
fied with
digits, the additional decimal places will be
truncated (i.e. there will be no rounding).
If
digits is omitted, six decimal places will be used.
Examples
VAL$(123) returns the string "123.000000".
VAL$(123.456789, 2) returns the string
"123.45".
VAL$(123.456789, 0) returns the string "123".
Function Short description
ASC Returns the ASCII code of the first character in a string.
CHR$ Returns the character representing the ASCII value of an
integer number as a string.
INSTR Searches for the occurrence of a specific sequence of
characters within a string.
LEN Returns the number of characters included in a string.
LEFT$ Reads a specific part of a string, starting from its begin-
ning.
MID$ Reads a specific part of a string.
RIGHT$ Reads a specific part of a string, starting from its end.
SPACE$ Returns a string, filled with a specific number of blanks.
Syntax
ASC(aString$)
Parameters
aString$ is a valid string expression.
Description
Returns the ASCII code of
aString$’s first character.
If the string is empty, ‘0’ will be returned.