Function Summary

The following sections present detailed information on the standard functions that are supported by GPL.  These functions are not grouped into a specific Class and are provided in this manner to be compatible with other Basic Language systems. As is standard in GPL, conversions between different arithmetic types, e.g. Boolean, Integer, Single, Double, are automatically performed as required. So, it is not necessary to have different variations on these functions to deal with the different possible mixes of input parameter data types. Also, these functions generally produce results that are formatted as Double’s. These results will automatically be converted to smaller data types as necessary, e.g. Double -> Integer, and will not generate an error so long as numeric overflow does not occur. summarizes the system functions that are described in greater detail in the following sections.

 
Function Description

CBool (expression)

Converts any numeric type or String to Boolean

CByte (expression)

Converts any numeric type or String to Byte.

CDbl (expression)

Converts any numeric type or String to Double.

CInt (expression)

Converts any numeric type or String to Integer.

CShort (expression)

Converts any numeric type or String to Short.

CSng (expression)

Converts any numeric type or String to Single.

CStr (expression)

Converts any numeric type to String.

Fix (number)

Truncates towards zero any numeric type returning only the integer portion of the number.

Hex (expression)

Converts an Integer value to String in Hexadecimal format.

Int (number)

Truncates towards negative infinity any numeric type returning only the integer portion of the number.

Rnd (seed)

Returns a pseudo random number.