Currently the FireScript language does not allow full-blown expressions. It does include two function expressions with some boolean operators for evaluating the state of variables. They are contains and isempty. The boolean operators supported are not and and.
The contains function takes two strings and returns true if the second string is found in the first. The search is case sensitive. Both strings are expanded first.
The isempty function takes a string and returns true if there are any characters in the string. You can use it to test if a value was specified for one of the intrinsic variables.
The not boolean operator reverses the value returned by the function expression.
Example:
If the HostAccount variable contains the value 'usr987i'
isempty (HostAccount) will return false but
not isempty(HostAccount) will evaluate to true.
The and boolean operator requires all specified conditions to be true.
Example, If the HostAccount variable contains a value such as 'usr987I'
The last reply from the server is "230 User logged in, please send account"
then the following expression will evaluate to true:
See Also |