A read/write variable (RWV) is a named storage that holds a data. The data can be any EDEN data structure. There is no need to declare a variable before it is used. Memory storage is allocated when the variable name first appears in a program. Data can be assigned to RWV's using assignment statements. For example,
V = 1;
The identifier (name) V
denotes an RWV whose value is assigned to integer
1
by the operator =
.
The semi-colon terminates the statement.
The value of an RWV is referenced if its name appears in an expression.
If the RWV has not been assigned a value before its value is referenced,
the value @
(meaning ``undefined'') is assigned to it automatically.
Different typed data can be assigned to the same variable at different time. The EDEN interpreter checks for data type clash at run-time.
The interpreter assumes all objects are RWV's until they are defined to be functions, formula definitions or action specifications.