Skip to content
Snippets Groups Projects
Commit 02a38e25 authored by edgrif's avatar edgrif
Browse files

add comments about return value declaration.

parent 98ad7e8d
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,29 @@ functions and static functions:</p>
</ul>
<h3>Function return values</h3>
<P>By convention the first local variable declared in a function should be the return value
which should be correctly initialised:</p>
<pre><code>
gboolean someFunc(void)
{
gboolean result = FALSE ;
return result ;
}
</code></pre>
<p>This helps a lot with scanning the code.</p>
<h3>Error handling vs. use of zMapAssert()</h3>
<p>A standard way to test that program state is as you expect while debugging
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment