Example of an Imperative Action


Action:


||give true
|and
||allocate a cell then bind "v" to it
thence
||check (it is true) then store 0 in the cell bound to "v"
|or
||check not (it is true) then store successor(0) in the cell bound to "v"

Informal description:

The first part of this action (before thence), gives the transient true, a bind from v to a memory cell and the allocated cell. The second part (after hence) works with the results of the first one, checks the truth-value of the transient and assign a number depend on that value.

Try this action using Java ANI.


RAT| People

[Created by Luis Carlos. Last edited at 16 Apr 2004 by Luis Carlos]