Variable Classes Variable Initialization Before a variable can be used it must be initialized. String and numeric variables can be initialized by placing them on the left side of an assignment statement. The statements: var_one = 36 $var_two = "two" initializes the variables var_one and $var_two. var_one = var_two initializes var_one if var_two has already been initialized. Otherwise, an undefined value error is returned. A variable can never be initialized on the right side of an assignment statement (var_two could never be initialized by the above statement). The statement: var_one = var_one + 10 is valid only if var_one has been initialized in a previous statement.
Strings, numeric variables, and location variables can be initialized by being loaded from a disk file. Strings and numeric variables can be initialized with the PROMPT instruction. Transformations and precision points can be initialized with the SET or HERE program instructions. They can also be initialized with the HERE monitor command or with the T20 pendant. See the eV+ Operating System Reference Guide for information on monitor commands. 1 Unless the program has declared a LOCAL or AUTO variable with the same name. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 50