beautypg.com

Visara Master Console Center Scripting Guide User Manual

Page 206

background image

Chapter 5 Script Commands

Scripting Guide

206

VAL

Syntax:

VAL( $String) ==> %Number

Description:

Converts a string expression to a number.

Action:

The first number characters in a string expression are returned as a

number.

Parameters:

$String. String expression. The string expression to convert to a

number.

Returns:

Numeric value. The first number characters in String formatted as a
numeric value. If the first characters in String are not numeric, VAL()

returns zero.

Notes:

N/A

Example:

%Var := VAL( “4”)

// 4

%Var := VAL( “123abcd”) // 123
%Var := VAL( “abcd123”) // 0

See Also:

STR