Action:
| | | | | | give 10 | | | | | and | | | | | | allocate a cell | | | | then | | | | | | bind "x" to the given cell # 2 | | | | | and | | | | | | store (the given datum # 1) in (the given cell # 2) | | | before | | | | | | give true | | | | | and | | | | | | allocate a cell | | | | then | | | | | | bind "y" to the given cell # 2 | | | | | and | | | | | | store (the given datum # 1) in (the given cell # 2) | | before | | | | | give 20 | | | | and | | | | | allocate a cell | | | then | | | | | bind "z" to the given cell # 2 | | | | and | | | | | store (the given datum # 1) in (the given cell # 2) | before | | | | give 0 | | | and | | | | allocate a cell | | then | | | | bind "result" to the given cell # 2 | | | and | | | | store (the given datum # 1) in (the given cell # 2) hence | | | give (the datum stored in (the cell bound to "y")) | | then | | | | | check ((the given datum) is true) | | | | and then | | | | | give (the datum stored in (the cell bound to "x")) | | | or | | | | | check ((the given datum) is false) | | | | and then | | | | | give (the datum stored in (the cell bound to "z")) | then | | store (the given datum) in (the cell bound to "result")Informal description:
The above action is the meaning of the following Specimen program:Try this action using Java ANI.program if1 =
var x : int := 10;
var y : bool := true;
var z : int := 20;
var result : int := 0
in
result := if y then x else z
end
[Created by Luis Carlos. Last edited at 16 Apr 2004 by Luis Carlos]