The assignment statement has the form Variable = Expression.
The left side of = is the name that you want to give to the data. This
is called a variable because its value can be changed with another assignment
statement. The right side of = is an expression that determines the value
that is represented by the variable after the expression has been evaluated.
| Assignment Expression | Comment |
| A = 3 | Assign the integer value 3 to the variable A. |
| B = -1 | Assign the integer value -1 to the variable B. |
| C = "My dog has fleas" | Assign the string My dog has fleas to the variable C. |
| D=A+B+5 | D has the integer value 7 after the expression has been evaluated. |
Unacceptable and Acceptable IDL Variable Names.
| Unacceptable | Reason | Acceptable |
| EOF | Conflicts with function name | A |
| 6A | Does not start with letter | A6 |
| _INIT | Does not start with letter | INIT_STATE |
| AB@ | Illegal character | ABC$DEF |
| ab cd | Embedded space | My_variable |
Complete list of IDL Reserved Words
| AND | BEGIN | CASE | COMMON |
| DO | ELSE | END | ENDCASE |
| ENDELSE | ENDFOR | ENDIF | ENDREP |
| ENDWHILE | EQ | FOR | FUNCTION |
| GE | GOTO | GT | IF |
| LE | LT | MOD | NE |
| NOT | OF | ON_IOERROR | OR |
| PRO | REPEAT | THEN | UNTIL |
| WHILE | XOR |