The data Statement Local variables, arrays, and character strings may be initialized at compile time with the data statement. Data in a global common may not be initialized at compile time. If initialization of data in a global common is required, it must be done at run time by an initialization procedure. The syntax of the data statement is defined identically to the standard Fortran 77 DATA statement.
Some simple examples follow.
Any data statements must follow all declarations. Note that variables initialized by data are not guaranteed to have that value except the first time the task is executed from the cl. IRAF tasks executed from the cl may be cached or stored in the process cache. Therefore, a variable modified in a task procedure will not have the initialized value the next time the task is executed, but will have the modified value. It is always safer to initialize variables with macro symbolic constant define statements or explicit assignment statements.