Difference between revisions of "NR.c"
From Organic Design wiki
(update here too) |
(update) |
||
| Line 1: | Line 1: | ||
// Moves "this" to node's [[[[focus]]]] if exists then rotates [[[[loop]]]] and executes/reduces the focus item | // Moves "this" to node's [[[[focus]]]] if exists then rotates [[[[loop]]]] and executes/reduces the focus item | ||
void nodeReduce() { | void nodeReduce() { | ||
| − | this = | + | if (this = nodeLoopRotate(parent = this)) { // Move "this" to the [[[[focus]]]] in the node's loop and rotate |
| − | + | nodeSetValue(this,nodePARENT,parent); // Update the [[[[parent]]]] association | |
| − | + | if (code = *nodeState(this,nodeCODE)) code(); // [[[[nodeCODE]]]] value is a pointer-index, execute as function-reference if non-zero | |
| − | nodeSetValue(this,nodePARENT,parent); | ||
| − | code | ||
| − | |||
} | } | ||
} | } | ||
Revision as of 06:19, 29 November 2006
// Moves "this" to node's [[focus]] if exists then rotates [[loop]] and executes/reduces the focus item void nodeReduce() { if (this = nodeLoopRotate(parent = this)) { // Move "this" to the [[focus]] in the node's loop and rotate nodeSetValue(this,nodePARENT,parent); // Update the [[parent]] association if (code = *nodeState(this,nodeCODE)) code(); // [[nodeCODE]] value is a pointer-index, execute as function-reference if non-zero } }



