NR.c

From Organic Design wiki
Revision as of 23:28, 8 November 2006 by Nad (talk | contribs)

// Moves "this" to node's [[focus]] if exists then rotates [[loop]] and executes/reduces the focus item void nodeReduce() { if (this = listGetValue(loop = this)) { // Move "this" to the [[focus]] in the node's [[current loop]] listSetValue(loop,nodeGetValue(this,nodeNEXT)); // Rotate the loop code *ptr = *nodeState(this,nodeCODE); // [[nodeCODE]] value is a pointer-index ptr ? ptr() : nodeReduce(); // Execute ptr if non-NULL, else [[reduce]] item } }