Difference between revisions of "Cond"

From WikiManual
Jump to: navigation, search
(Condition)
(Condition)
Line 4: Line 4:
 
'''cond''' marks the start of a gene in the DNA. Everything from cond to [[start]] is evaulated. Once the program reaches start, any values still on the conditions stack are anded together. If the resulting boolean value is true, every [[action]] after start to the next stop command is executed.
 
'''cond''' marks the start of a gene in the DNA. Everything from cond to [[start]] is evaulated. Once the program reaches start, any values still on the conditions stack are anded together. If the resulting boolean value is true, every [[action]] after start to the next stop command is executed.
  
Otherwise, the program continues to the next cond statement, or stops reading the DNA if the[[end]] is found instead.
+
Otherwise, the program continues to the next cond statement, or stops reading the DNA if the [[end]] is found instead.
  
  
 
The condition is the part of the gene that tells if  should happen or not. Many action commands can be used in here but not all.
 
The condition is the part of the gene that tells if  should happen or not. Many action commands can be used in here but not all.

Revision as of 19:24, 17 September 2005

Condition

cond marks the start of a gene in the DNA. Everything from cond to start is evaulated. Once the program reaches start, any values still on the conditions stack are anded together. If the resulting boolean value is true, every action after start to the next stop command is executed.

Otherwise, the program continues to the next cond statement, or stops reading the DNA if the end is found instead.


The condition is the part of the gene that tells if should happen or not. Many action commands can be used in here but not all.