WiseScript Editor Reference
137
Expression Operators
In conditionals, loops, and Set Variable commands, you can use the following operators:
symbols, functions, or logical operators.
Operators can operate on a variable or a constant. There are two types of constants:
numeric and string. Numeric constants must be a positive or negative integer (example:
234 or -100). Strings must be enclosed in quotation marks (“ ”).
If you enter a variable name instead of a number or string in any of the functions below,
do not enter the % characters around the variable name. Variables must follow standard
naming conventions.
See
Variables and Expressions
on page 28.
For details on scripts that demonstrate using expression operators, see the sample
scripts that manipulate strings and perform calculations. For details on sample scripts,
see ScriptHelp.htm in the Samples subdirectory of this product’s installation directory.
Symbols
Functions
TEMPLATES
C:\Documents and
Settings\user\Templates.
TEMP
Folder where temporary
files can be created.
C:\DOCUME~1\User\LOCALS~1\Temp
USERPROFILE
Location of the current
user’s profile.
C:\Documents and Settings\User
+
Addition
–
Subtraction
*
Multiplication
/
Division
Left$(str, position)
Returns the left portion of a string, where str is the string,
and position is the number of characters from the left to
return. Example: Left$(“windows”,3) returns “win.”
Right$(str,position)
Returns the right portion of a string, where str is the
string, and position is the number of characters from the
right to return. Example: Right$(“windows”,3) returns
“ows.”
Mid$(str,position,
length)
Returns the middle portion of a string, where str is the
string, position is the number of characters from the left to
start, and length is the number of characters to return.
Example: Mid$(“windows”,2,3) returns “ind.”
Concat$(str1,str2)
Joins two strings.
Variable
Description
Example Value
Summary of Contents for ALTIRIS INVENTORY 7.0 SP2 - FOR NETWORK DEVICES V1.0
Page 1: ...WiseScript Editor Reference ...
Page 31: ...WiseScript Editor Reference 31 ...
Page 91: ...WiseScript Editor Reference 91 ...
Page 148: ...WiseScript Editor Reference 148 ...