free web site builder

TYPE CONVERSION FUNCTIONS

SYNTAX

FUNCTION BOOLEAN(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS BOOLEAN

FUNCTION BYTE(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS BYTE

FUNCTION SHORT(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS SHORT

FUNCTION INTEGER(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS INTEGER

FUNCTION LONG(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS LONG


FUNCTION FLOAT(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS FLOAT

FUNCTION DOUBLE(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS DOUBLE


FUNCTION STRING(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS STRING


FUNCTION VARIANT(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | STRING | VARIANT }) AS VARIANT


FUNCTION COMPLEX(X AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | COMPLEX | STRING | VARIANT }

    [, Y AS { BOOLEAN | BYTE | SHORT | INTEGER | LONG | FLOAT | DOUBLE | COMPLEX | STRING | VARIANT } ] ) AS DOUBLE


FUNCTION REAL(X AS COMPLEX) AS DOUBLE

FUNCTION IMAGINARY(X AS COMPLEX) AS DOUBLE

DESCRIPTION


BOOLEAN(X) returns a BOOLEAN containing X as a boolean value.

BYTE(X) returns a BYTE containing X as a byte value.

SHORT(X) returns a SHORT containing X as a short vaue.

INTEGER(X) returns an INTEGER containing X as an integer value.

LONG(X) returns a LONG containing X as a long value.


FLOAT(X) returns a FLOAT containing X as a float value.

DOUBLE(X) returns a DOUBLE containing X as a double value.

STRING(X) returns a STRING containing X as a string value.

VARIANT(X) returns a VARIANT containing the value of X where X can be a variable of any datatype.


COMPLEX(X) returns a complex number constaining the real number X

COMPLEX(X, Y) returns a complex number containing real value set to X and imaginary value set to Y.

REAL(X) returns the real value of the complex argument.

IMAGINARY(X) returns the imaginary value of the complex argument.