Difference between revisions of "NR.c"
From Organic Design wiki
m |
|||
| Line 1: | Line 1: | ||
| − | if (this = nodeGetValue(loop = nodeTraverse(this,nodeLOOP),0)) { // this = current loop item | + | // Moves "this" to current loop item if exists then rotates loop and executes or reduces the item |
| − | + | void nodeReduce() { | |
| − | + | if (this = nodeGetValue(loop = nodeTraverse(this,nodeLOOP),0)) { // this = current loop item | |
| + | nodeSetValue(loop,0,nodeGetValue(this,nodeNEXT)); // Rotate loop | ||
| + | nodeGetValue(this,nodeCODE)?((code*)*nodeState(this,0))():nodeReduce(); // Exec or reduce item | ||
| + | } | ||
} | } | ||
Revision as of 01:22, 4 November 2006
// Moves "this" to current loop item if exists then rotates loop and executes or reduces the item void nodeReduce() { if (this = nodeGetValue(loop = nodeTraverse(this,nodeLOOP),0)) { // this = current loop item nodeSetValue(loop,0,nodeGetValue(this,nodeNEXT)); // Rotate loop nodeGetValue(this,nodeCODE)?((code*)*nodeState(this,0))():nodeReduce(); // Exec or reduce item } }



