Difference between revisions of "Logic"
From WikiManual
(→Logic:) |
m (Fixed typos) |
||
Line 4: | Line 4: | ||
Logic operators perform boolean operations on values on the boolean stack, popping them off the stack in the process and pushing the result onto the stack, either true or false. The result obviously depends upon the boolean operator used and the values on the stack at the time. | Logic operators perform boolean operations on values on the boolean stack, popping them off the stack in the process and pushing the result onto the stack, either true or false. The result obviously depends upon the boolean operator used and the values on the stack at the time. | ||
− | As of version 2.43q, boolean operations can be performed in both the conditional and body portions of a gene. Commands which modify bot memory (store, | + | As of version 2.43q, boolean operations can be performed in both the conditional and body portions of a gene. Commands which modify bot memory (store, inc and dec) will only succeed if the top of the boolean stack is true at the time the memory operation is attempted. |
===Energy Cost:=== | ===Energy Cost:=== | ||
As of version 2.4, you can set the Energy cost per logic command executed if you so choose. The default cost is 0. | As of version 2.4, you can set the Energy cost per logic command executed if you so choose. The default cost is 0. |
Latest revision as of 21:09, 14 February 2014
Logic:
|
Logic:
Logic operators perform boolean operations on values on the boolean stack, popping them off the stack in the process and pushing the result onto the stack, either true or false. The result obviously depends upon the boolean operator used and the values on the stack at the time.
As of version 2.43q, boolean operations can be performed in both the conditional and body portions of a gene. Commands which modify bot memory (store, inc and dec) will only succeed if the top of the boolean stack is true at the time the memory operation is attempted.
Energy Cost:
As of version 2.4, you can set the Energy cost per logic command executed if you so choose. The default cost is 0.