Cast

Description:              This function takes a value and returns a different type of value, if possible.

Returns:                    Numeric

Usage:                       Script or Steady State

Format:                      Cast(Val, Type)

Parameters:             Val    { text }  { required }  { no default: }

                                                Any variable name.

                                    Type    { numeric }  { required }  { no default: }

                                                A number indicating what type of value should be returned.

Comments:               This function performs a type-cast, changing one type of value to another. Note that values that are converted to integers are truncated, rather than rounded.

                             If a stream longer than 65,523 characters is cast to a text string, it will be truncated at 65,523 characters.

Example: 

xFloat = 2.61;

xInt = Cast(xFloat, 1);

The value of xInt will be set to 2.

See Also:

ValueType