<link rel="PREVIOUS" title="Documentation Guidelines" href="documentation.html">
<link rel="NEXT" title="Testing Guidelines" href="testing.html">
<link rel="STYLESHEET" type="text/css" href="../p_doc.css">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="NAVHEADER">
maintenance easier and increasing chances of success of the project.</p>
<p>And that of course comes back to us as individuals. If we can increase our development and product
efficiencies then we can solve more of the request for changes/improvements and in general feel good about
- ourselves. ;-></p>
+ ourselves. ;-></p>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="S2" id="S2">4.2. Using Comments</a></h2>
<tr>
<td>
<pre class="PROGRAMLISTING">/* if page size greater than 1k ... */
-if (page_length() > 1024)
+if (page_length() > 1024)
{
... "block" the page up ...
}
/* if page size is small, send it in blocks */
-if (page_length() > 1024)
+if (page_length() > 1024)
{
... "block" the page up ...
}
</tr>
</table>
<p><span class="emphasis"><i class="EMPHASIS">Note:</i></span> We have a standard naming scheme for #defines
- that toggle a feature in the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word)
+ that toggle a feature in the preprocessor: FEATURE_>, where > is a short (preferably 1 or 2 word)
description.</p>
<p><span class="emphasis"><i class="EMPHASIS">Example:</i></span></p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">structure->flag = (condition);</pre>
+ <pre class="PROGRAMLISTING">structure->flag = (condition);</pre>
</td>
</tr>
</table>
<p><span class="emphasis"><i class="EMPHASIS">Instead of:</i></span></p>
- <p>if (condition) { structure->flag = 1; } else { structure->flag = 0; }</p>
+ <p>if (condition) { structure->flag = 1; } else { structure->flag = 0; }</p>
<p><span class="emphasis"><i class="EMPHASIS">Note:</i></span> The former is readable and concise. The later is
wordy and inefficient. Please assume that any developer new to the project has at least a "good" knowledge of
C/C++. (Hope I do not offend by that last comment ... 8-)</p>
<div class="SECT3">
<h3 class="SECT3"><a name="S20" id="S20">4.4.5. Don't use white space around structure operators</a></h3>
<p><span class="emphasis"><i class="EMPHASIS">Explanation:</i></span></p>
- <p>- structure pointer operator ( "->" ) - member operator ( "." ) - functions and parentheses</p>
+ <p>- structure pointer operator ( "->" ) - member operator ( "." ) - functions and parentheses</p>
<p>It is a general coding practice to put pointers, references, and function parentheses next to names. With
spaces, the connection between the object and variable/function name is not as clear.</p>
<p><span class="emphasis"><i class="EMPHASIS">Example:</i></span></p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">a_struct->a_member;
+ <pre class="PROGRAMLISTING">a_struct->a_member;
a_struct.a_member;
function_name();</pre>
</td>
</tr>
</table>
- <p><span class="emphasis"><i class="EMPHASIS">Instead of:</i></span> a_struct -> a_member; a_struct .
+ <p><span class="emphasis"><i class="EMPHASIS">Instead of:</i></span> a_struct -> a_member; a_struct .
a_member; function_name ();</p>
</div>
<div class="SECT3">
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
- <pre class="PROGRAMLISTING">const char FILENAME_rcs[] = "$I<!-- Break CVS Substitution -->d$";
-/*********************************************************************
+ <pre class="PROGRAMLISTING">/*********************************************************************
*
- * File : $S<!-- Break CVS Substitution -->ource$
+ * File : $Source
*
* Purpose : (Fill me in with a good description!)
*
<td>
<pre class="PROGRAMLISTING">#ifndef _FILENAME_H
#define _FILENAME_H
-#define FILENAME_H_VERSION "$I<!-- Break CVS Substitution -->d$"
/*********************************************************************
*
- * File : $S<!-- Break CVS Substitution -->ource$
+ * File : $Source
*
* Purpose : (Fill me in with a good description!)
*
* 1 : param1 = pointer to an important thing
* 2 : x = pointer to something else
*
- * Returns : 0 => Ok, everything else is an error.
+ * Returns : 0 => Ok, everything else is an error.
*
*********************************************************************/
int FUNCTION_NAME(void *param1, const char *x)