Difference between revisions of "End"

From WikiManual
Jump to: navigation, search
(Flow Commands)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The most important of all even if it is only written once in a file, End tells the program when to stop reading the DNA. If it is not there the program will add (random?) numbers, largly consisting of zeros until another bot's DNA(that does contain end) is added to the end(normally a veggie). Often errors can occur due to lack of a proper end statement.
+
== Pre-2.4 ==
 +
End is the most important of all commands, even if it was only written once.  "end" tells the program when to stop reading in a DNA file. If there is no end, the program will likely read in residual numbers from RAM and interpret them as DNA.  Often, other bot's DNA that is still in memory will be read in until its end is found. Many, many errors are caused by the lack of a proper end statement.
  
=== Flow Commands===
+
== Post-2.4 ==
* [[cond]]
+
End is now added in automatically to all text files that do not contain it.  Which means you don't ''have'' to include it in your DNA files anymore.  Backwards compatibility is maintained still, and loading in a DNA file with an end in it will work just as well as the same DNA file without the end.
* [[start]]
+
 
* [[stop]]
+
example:
* [[end]]
+
 
* [[Robot DNA]]
+
'''cond'''
 +
*.eye5 50 >
 +
'''start'''
 +
-1 .shoot store
 +
'''stop'''
 +
'''end'''
 +
 
 +
{{Flow Commands}}

Latest revision as of 10:20, 1 July 2014

Pre-2.4

End is the most important of all commands, even if it was only written once. "end" tells the program when to stop reading in a DNA file. If there is no end, the program will likely read in residual numbers from RAM and interpret them as DNA. Often, other bot's DNA that is still in memory will be read in until its end is found. Many, many errors are caused by the lack of a proper end statement.

Post-2.4

End is now added in automatically to all text files that do not contain it. Which means you don't have to include it in your DNA files anymore. Backwards compatibility is maintained still, and loading in a DNA file with an end in it will work just as well as the same DNA file without the end.

example:

cond
*.eye5 50 >
start
-1 .shoot store
stop
end

Flow Commands:

cond
start else
stop
end