[Avida-cvs] [avida-svn] r913 - development/documentation
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Wed Aug 30 19:23:22 PDT 2006
Author: brysonda
Date: 2006-08-30 22:23:22 -0400 (Wed, 30 Aug 2006)
New Revision: 913
Modified:
development/documentation/code_task.html
Log:
Update Task Implementation Checklist documentation. (missed font --> span tag translation)
Modified: development/documentation/code_task.html
===================================================================
--- development/documentation/code_task.html 2006-08-31 02:21:25 UTC (rev 912)
+++ development/documentation/code_task.html 2006-08-31 02:23:22 UTC (rev 913)
@@ -41,7 +41,7 @@
then add the line to this file:
</p>
<pre>
-double <font color="#008800">Task_Times2</font>(<span style="color: #880000">cTaskContext</span>* <span style="color: #000088">ctx</span>) const;
+double <span style="color: #008800">Task_Times2</span>(<span style="color: #880000">cTaskContext</span>* <span style="color: #000088">ctx</span>) const;
</pre>
<p>
@@ -62,11 +62,11 @@
</p>
<pre>
-double <font color="#880000">cTaskLib</font>::<font color="#008800">Task_Times2</font>(<span style="color: #880000">cTaskContext</span>* <span style="color: #000088">ctx</span>) const
+double <span style="color: #880000">cTaskLib</span>::<span style="color: #008800">Task_Times2</span>(<span style="color: #880000">cTaskContext</span>* <span style="color: #000088">ctx</span>) const
{
- const <font color="#880000">int</font> <font color="#000088">test_output</font> = <span style="color: #000088">ctx</span>-><font color="#000088">output_buffer</font>[0];
- for (<font color="#880000">int</font> <font color="#000088">i</font> = 0; <font color="#000088">i</font> < <span style="color: #000088">ctx</span>-><font color="#000088">input_buffer</font>.<font color="#008800">GetNumStored</font>(); <font color="#000088">i</font>++) {
- if (2 * <span style="color: #000088">ctx</span>-><font color="#000088">input_buffer</font>[i] == <font color="#000088">test_output</font>) {
+ const <span style="color: #880000">int</span> <span style="color: #000088">test_output</span> = <span style="color: #000088">ctx</span>-><span style="color: #000088">output_buffer</span>[0];
+ for (<span style="color: #880000">int</span> <span style="color: #000088">i</span> = 0; <span style="color: #000088">i</span> < <span style="color: #000088">ctx</span>-><span style="color: #000088">input_buffer</span>.<span style="color: #008800">GetNumStored</span>(); <span style="color: #000088">i</span>++) {
+ if (2 * <span style="color: #000088">ctx</span>-><span style="color: #000088">input_buffer</span>[i] == <span style="color: #000088">test_output</span>) {
return 1.0;
}
}
@@ -77,7 +77,7 @@
<p>
The most recent output is always placed at the beginning of the output
buffer, so we store it in the variable
-<font color="#000088">test_output</font> to compare it against all of the
+<span style="color: #000088">test_output</span> to compare it against all of the
different inputs. We then have a for-loop that goes from 0 to the number
of inputs stored in the input buffer. Inside the body of the loop, we
test for each input if twice that input is equal to the output. If so,
@@ -100,14 +100,14 @@
<p>
This next step is also done in the code file, inside the
-<font color="#880000">cTaskLib</font>::<font color="#008800">AddTask</font>()
+<span style="color: #880000">cTaskLib</span>::<span style="color: #008800">AddTask</span>()
method. Again, we want this to be in the same place, so we locate the
task 'echo' that its supposed to follow, and add in the new line.
</p>
<pre>
-else if (<font color="#000088">name</font> == "times2")
- <font color="#008800">NewTask</font>(<font color="#000088">name</font>, "Times2", &<font color="#880000">cTaskLib</font>::<font color="#008800">Task_Times2</font>);
+else if (<span style="color: #000088">name</span> == "times2")
+ <span style="color: #008800">NewTask</span>(<span style="color: #000088">name</span>, "Times2", &<span style="color: #880000">cTaskLib</span>::<span style="color: #008800">Task_Times2</span>);
</pre>
<p>
More information about the Avida-cvs
mailing list