Chapter 6 RAPID!
Functions
WCDMA Options Version 6.20
185
Numeric functions This subsection describes functions that convert numbers or perform numeric
operations.
Note: In case uninitialized variables are used as arguments, the returned values
will usually be
"0" or 0.
BIN
BIN$
Function Short description
BIN Converts a binary representation of a numeric expression
into its decimal equivalent.
BIN$ Transforms a numeric expression into its binary represen-
tation.
CINT Rounds a numeric expression to an integer, using com-
mercial rounding.
HEX Converts a hexadecimal representation of a numeric
expression into its decimal equivalent.
HEX$ Transforms a numeric expression into its hexadecimal
representation.
OCT Converts an octal representation of a numeric expression
into its decimal equivalent.
OCT$ Transforms a numeric expression into its octal represen-
tation.
VAL Converts a string expression into a numeric expression.
VAL$ Converts a numeric expression into a string expression.
Syntax
BIN(string$)
Parameters
string$ is a string expression, containing a valid binary
representation of an integer number.
Description
Returns the decimal representation of a binary expres-
sion contained in
string$.
The value returned will be an integer.
Examples
LET i=BIN("101") assigns ‘5’ to variable i.
Syntax BIN$(aNumber [, digits ])
Parameters
aNumber is a valid numeric expression,
digits is an expression, resulting in a positive integer.