Convert

See Also: Type Conversion Functions, Data Types. Functions and Constants

Purpose

The Convert function returns a variable of the specified type that is the best conversion from the original variable. Note that Type Conversion Functions, such as Integer or String for a known target data type are more commonly used.

Return Type

Specified type

Syntax

Convert( {Var}, {Type} )

Where:

Example

Procedure testConvert

    UInteger u

    Real r

 

    move 3.1415 to r

    // Move Real r to Unsigned Integer u, decimals will drop off

    move (Convert(r, UInteger)) to u

 

    Send Info_Box u "Result"

End_Procedure

Notes