Fornest & GetPut

The combination of FORNEST and GETPUT allows for the description of

a = a + 1

in a knowledge network. Here, the variables OldA and NewA take on the roles of a on either side of what in programming terms would be a fetch/store assignment. The GETPUT operator handles the moving of values from one side to the other, reacting to a signal from the FORNEST (or WHILE) operator.

NewForAll.gif (382948 bytes)


The FORNEST, triggered into action, puts out an Initialisation, signalling the start of the loop.

The FORNEST puts out a value for I, which is an input to the GETPUT operator.
If GETPUT's variable is unknown, it puts out the Default Value, otherwise it puts out the current value of the variable.
The value moves through the network, eventually encountering the GETPUT again.
The GETPUT sets the value of the variable to the new value, without changing the value it put out before. It then puts out a value of True to Test.
I is reset to NYK, killing all data in the loop.
A new value for I is pushed out, restarting the process.
The loop is repeated until Test returns False, or the loop is exhausted.

Multiple GETPUT operators can be connected through an AND to the FORNEST.