Difference between revisions of "ExecList"
From NexusWiki
LordValarian (Talk | contribs) (Created page with 'ExecList( list, condition); It evaluates the term for all of the list’s elements. This usually means the execution of the commands, but it can mean something else too, e.g. s...') |
LordValarian (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | ExecList( list, condition); | + | '''ExecList'''( list, condition); |
It evaluates the term for all of the list’s elements. This usually means the execution of the commands, but it can mean something else too, e.g. summarizing. | It evaluates the term for all of the list’s elements. This usually means the execution of the commands, but it can mean something else too, e.g. summarizing. | ||
Line 5: | Line 5: | ||
sum=0; ExecList(1, set(sum, sum+S.energy)) it sums the energy of the list’s objects into a variable called sum. | sum=0; ExecList(1, set(sum, sum+S.energy)) it sums the energy of the list’s objects into a variable called sum. | ||
− | '''obj:Colony(); | + | '''obj:Colony();''' |
− | obj:Nexus(); | + | '''obj:Nexus();''' |
− | obj:Npc(); | + | '''obj:Npc();''' |
− | obj:Race(); | + | '''obj:Race();''' |
− | obj:Station(); | + | '''obj:Station();''' |
− | obj:System(); | + | '''obj:System();''' |
− | obj:UType();''' | + | '''obj:UType();''' |
These return 1, if ’obj’ falls into the given category. | These return 1, if ’obj’ falls into the given category. |
Revision as of 01:38, 19 June 2009
ExecList( list, condition);
It evaluates the term for all of the list’s elements. This usually means the execution of the commands, but it can mean something else too, e.g. summarizing. E.g.: ExecList(1, Explode_listobject()) all objects that are in the list will explode, sum=0; ExecList(1, set(sum, sum+S.energy)) it sums the energy of the list’s objects into a variable called sum.
obj:Colony(); obj:Nexus(); obj:Npc(); obj:Race(); obj:Station(); obj:System(); obj:UType();
These return 1, if ’obj’ falls into the given category.