Description: This function returns true if the parameter is valid.
Returns: Boolean
Usage: Script or Steady State
Format: Valid(X)
Parameters: X { varies } { required } { no default: }
Any expression to be tested for validity.
Comments: This function always returns a valid value.
Examples:
a = Valid(1.23);
b = Valid("Help");
c = Valid(Invalid);
d = Valid(12.3 / 0);
The values for a, b, c and d will be 1, 1, 0 and 0 respectively.
A common use for this function is as an action trigger to prevent "if 1" conditions:
If ! Valid(startTime);
[
startTime = Seconds();
]
This will cause the script to execute once and once only; startTime will be set to the time (in seconds since midnight) that the script was executed.
See Also: