In NetDecision Script Language, you use variables
to temporarily store values during the execution of an application.
Variables have a name (the word you use to refer to the value the
variable contains) and a data type (which determines the kind of
data the variable can store).
To declare a variable is
to tell the program about it in advance. The declaration syntax is
TypeName VariableName1, [VariableName2,
string sMessage = "Hello", sData
Variables declared within
a function exist only as long as the function is executing. When
the function finishes, the value of the variable disappears. In
addition, the value of a variable in a function is local to that
function - that is, you can't access a variable in one function
from another function. These characteristics allow you to use the
same variable names in different functions without worrying about
conflicts or accidental changes.
- Must begin with a letter.
- Can not contain an embedded period.
- Must not exceed 255 characters.
- Must be
unique within the same scope, which is the range from which
the variable can be referenced.
||Integer data consists of numeric data with
precision to a whole number.
||Floating point number.
||Allows manipulation and formatting of text strings
and determination and location of sub-strings within strings.
||Multidimensional collection (array) of variables.
For more information, refer to Arrays.
||SNMP variable binding. Consists of Object ID,
Object Syntax and Object Value. For more information, refer
to SNMP Management.
||SNMP PDU (Protocol Data Unit) - set of SNMP PDU
parameters plus Variable Binding list. For more information,
refer to SNMP
||XML DOM Document node.
||The byte type can represent integers in the range
from 0 to 255, inclusive.
||The char type is used to store the integer value of
a member of the representable character set. That integer value is
the ASCII code corresponding to the specified character.