next up previous contents index
Next: Path Manipulation and Query Up: Main Functions 2 Previous: Memory Management   Contents   Index

Script Variables

(int) Defined(variable)
If a variable is referenced before it is assigned to, the variable has no type, but behaves in all ways as a string set to the variable's name. This function returns 1 if the argument has a type assigned, or 0 if it has no type.

(string) TypeOf(variable)
This function returns a string which indicates the type of variable passed as an argument. The possible returns are

``none'' variable has no type
``scalar'' variable is a scalar number
``complex'' variable is a complex number
``string'' variable is a string
``array'' variable is an array
``zoidlist'' variable is a zoidlist
``layer_expr'' variable is a layer_expr
``handle'' variable is a handle to something

Stephen R. Whiteley 2022-05-28