array |
A multi-dimensional array that can contain any mixture of types. |
Users={"fred", "jen", "sally"}; Ids={1, 9, 10}; Usermap={ Users, Ids}; print(umap[0][2] + " -> " + umap[1][2]); |
boolean |
The values true and false. |
x = true; |
double |
A number with a fractional component. |
x=2.5; y=4.3; print(x+y); #prints 6.8 |
int |
The type integer includes the set of integers (…, -2, -1, 0, 1, 2, …).
The constants true and false are defined to have the values 1 and 0, respectively.
Specify hexadecimal numbers with the prefix 0x. |
count=0; x=y=1;
You can specify an octal number by preceding it with a leading zero. For example, when specifying a umask value runumask=022 |
ldapid |
Special type to support LDAP functions. |
|
ldapsearchresult |
Special type to support LDAP functions. |
|
list |
An ordered group of strings separated by commas and surrounded by curly braces.
List elements are accessed by post-fixing them with square brackets [ ] containing the index of the desired element. Indices start at 0. |
mylist = {"string zero", "string one", "string two"}; print( {"a", "b", "c"}[1] ); # prints "b" |
string |
A sequence of zero or more characters within single or double quotes. |
Mystr="this is a string"; Str1="user: " + user; |
undefined |
A variable is assigned a type when it is assigned a value of that type.
A variable that is referenced but has not been assigned a value is set to the type undefined. |
if (typeof(myvar) == "undefined") { myvar=user;} |