Assign Action
The assign action is used to assign values to parameters. The syntax for the assign action is:
<assign> ::= assign <parameter-name> := <expression>
To be well formed, the <expression> must result in a value that conforms to the type of the parameter.
NOTE
Readers familiar with AI techniques may already have realized that use of assign makes it possible to combine forward chaining capabilities of sections with the backward chaining capabilities in the parameter rules.
Examples
section start 'a very short section to illustrate assign'
assign n := 7 + 8 / 2
advice 'evaluation of 7 + 8 / 2 gives ' n
assign n := (7 + 8) / 2
advice 'evaluation of (7 + 8) / 2 gives ' n
'as / has higher priority than +.' &
'Notice that the parameter indeed did change the value'
parameter n 'n'
type number
Note the ESTA always begins evaluation from the start section and further on. Thus if you for instance change the value of parameter 'n' by choosing the menu item "What if parameter changes its value" in the Parameter menu during a consultation, this changed value will always be overwritten by the assignments in the start section, meaning that the what-if change command would not have any effect.