    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Reading Integers</title>
        <link>https://members.accu.org/index.php/articles/986</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + CVu Journal Vol 12, #2 - Mar 2000</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c127/">122</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-127/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+127/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Reading Integers</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 03 March 2000 13:15:35 +00:00 or Fri, 03 March 2000 13:15:35 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e18" id="d0e18"></a></h2>
</div>
<p>I suspect that the third topic mentioned on most programming
courses, irrespective of the language being taught, is reading in
numbers. (The first, of course, is to write &quot;Hello, world.&quot;, and
the second is to write out a number.) And because of this, the
topic is never re-visited later in the course when a greater
knowledge of the language has been obtained and so the problems of
reading numbers are better understood.</p>
<p>So in this piece I am going to look at certain aspects of
reading numbers (or at least, the aspect that brought this topic to
mind) and suggest that there is a better approach to fetching user
responses than always calling <tt class="function">scanf</tt>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e27" id="d0e27"></a>The Beginner's
Way of Reading Integers</h2>
</div>
<p>I suppose the first way one is told to read a number always
looks like</p>
<pre class="programlisting">
#include &lt;stdio.h&gt; 
int i; 
scanf (&quot;%i&quot;, &amp;i);
</pre>
<p>and because the student has a lot to cope with even to get this
to work, he may be told &quot;Don't worry how it does it, but it does
read a whole number from your terminal into '<tt class=
"varname">i</tt>'.&quot;</p>
<p>But we've got a little further into the programming course and
so know better. <tt class="function">scanf</tt> reads characters
from the file called <tt class="filename">stdin</tt>. This is
connected, or opened, by default, such that it receives the
characters typed by the user at the keyboard. So this function
provides a way of getting numbers into one's program. It does this
in the way directed by the first parameter, which is called the
format and must contain zero, or more directives. Now a directive
can be a conversion specifier that says how something is to be
read. Other directives say how to discard characters so as to reach
those we actually want.</p>
<p>The format used here is the string literal &quot;<tt class=
"literal">%i</tt>&quot;. A character array would also do if correctly
set up. The format &quot;<tt class="literal">%i</tt>&quot; contains a single
conversion specifier instructing <tt class="function">scanf</tt> to
read an integer. And as the conversion specifiers are matched up
with the subsequent arguments to <tt class="function">scanf</tt>,
the value of the integer read will be written into the integer
<tt class="varname">i</tt>.</p>
<p><tt class="function">scanf</tt> returns an integer value which
is either that of the macro EOF, which indicates that the end of
file has been found, or the number of input items which were
assigned. That is, it says how many numbers were successfully read
in.</p>
<p>This return value is ignored here as the example was intended as
a 'get you going' measure for a first lesson in programming. Now
that I know better, I would check its value. In addition to EOF and
the value 1, I would also be prepared for a return value of 0 which
means nothing has been assigned, and something has gone wrong.</p>
<p>And finally, the standard header <tt class=
"filename">&lt;stdio.h&gt;</tt> is included to provide a prototype
for <tt class="function">scanf</tt>, which allows the compiler to
do some limited checking that the function is being used as its
author intended.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e78" id="d0e78"></a>But Does the
Beginner's Way Work?</h2>
</div>
<p>Let me continue with the format argument, &quot;<tt class=
"literal">%i</tt>&quot;. What do you expect scanf to make of the
following strings given this format?</p>
<pre class="literallayout">
10 
0xa 
012
</pre>
<p>In his haste to complete his notes, the tutor writing this
example saw that the conversion specifier '<tt class=
"varname">i</tt>' read an integer, but didn't appreciate that the
subsequent mention of &quot;the <tt class="function">strtol</tt>
function with a value of 0 for its 'base' argument&quot; meant that the
number base would be deduced from the first few characters of the
number.</p>
<p>So all three of the examples are accepted in their entirety, and
return the decimal value 10. I suspect that the hapless lecturer
meant to use the specifier &quot;<tt class="literal">%d</tt>&quot; to force a
decimal integer to be read. Then the values returned would be 10, 0
and 12 decimal, respectively. And in the second example, the
characters &quot;<tt class="literal">xa</tt>&quot; would remain to be read by
the next format specifier.</p>
<p>I would also like something like:</p>
<pre class="programlisting">
printf (&quot;Please enter 'i': &quot;);
</pre>
<p>to appear immediately before the use of scanf just to remind the
user what is expected of him. Perhaps I am a little unfair here.
After all, this is an example from a first lesson. Hopefully, the
student will appreciate such niceties later.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e110" id="d0e110"></a>What
'<tt class="function">scanf</tt>' does</h2>
</div>
<p>Let me say a little more about the precise way <tt class=
"function">scanf</tt> (and <tt class="function">fscanf</tt> and
<tt class="function">sscanf</tt>) reads numbers. I shall continue
using the &quot;<tt class="literal">%i</tt>&quot; format. <tt class=
"function">scanf</tt> has the prototype</p>
<pre class="programlisting">
int scanf (char const *format,...)
</pre>
<p>provided in</p>
<pre class="programlisting">
#include &lt;stdio.h&gt;
</pre>
<p><tt class="function">scanf</tt> starts by reading from
<tt class="filename">stdin</tt>, and discarding, all white space
characters it sees. 'White space' characters are defined by what
the <tt class="function">isspace</tt> function does, but this
generally means skipping the end of line marker from the previous
line, then all spaces and tab characters until a 'visible
character' is found.</p>
<p>Having found the first non-white space character, an integer is
then built, so that character had better be a digit. Because a
field width has not been specified, as many digits as possible are
used to build that integer. As reading proceeds, the base of the
number is sorted out. Reading stops when either reading a further
digit would cause the number to become too big to be held in an
<tt class="type">int</tt> , or a non-digit is found
(<i><span class="remark">see editor's notes at end</span></i>).</p>
<p>The number is returned in the variable pointed to by the next
argument to <tt class="function">scanf</tt>, and the number of
items assigned is incremented. (Actually, it is set to one, as this
is the first conversion specifier.)</p>
<p>The file <tt class="filename">stdin</tt> is left pointing to the
character which is next to be read. In this example, this is
probably the carriage return or line feed at the end of the
line.</p>
<p>And here we start to see the first serious problem with
<tt class="function">scanf</tt>. If the user typed more digits than
could reasonably be used in an <tt class="type">int</tt>, the next
call to <tt class="function">scanf</tt> will build an integer from
those remaining characters, rather than starting off by reading a
new line. And the user will wonder why his program didn't wait for
him to type in a number before continuing, or claim that he typed
in one number and the machine stored something completely
different.</p>
<p>This sort of problem can prove very baffling, especially if the
input is being read direct from a disk file, rather than the
terminal, so the user does not notice the machine not waiting for
him to finish his line.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e180" id="d0e180"></a>Avoid the
Problem</h2>
</div>
<p>It is to avoid these problems that the more experienced
programmer uses <tt class="function">fgets</tt> to read a string
from the terminal and then seeks methods other than <tt class=
"function">sscanf</tt> to extract the number it contains.
<tt class="function">fgets</tt> has the prototype</p>
<pre class="programlisting">
#include &lt;stdio.h&gt; 
char *fgets (char *s, int n, FILE *stream);
</pre>
<p>one might be drawn to the somewhat similar function 'gets',
which has the prototype</p>
<pre class="programlisting">
#include &lt;stdio.h&gt; char *gets (char *s);
</pre>
<p>But <tt class="function">gets</tt> must never be used (unless
you really understand what you are doing, and very rarely then),
because although it reads directly from <tt class=
"filename">stdin</tt>, and does not leave the new line character,
'<tt class="literal">\n</tt>', at the end of the line, it does not
limit the number of characters read from the line. So typing too
many characters into the array given to <tt class=
"function">gets</tt> for the parameter '<tt class="literal">s</tt>'
will result in something being overwritten and, at best, the
program crashing immediately.</p>
<p><tt class="function">fgets</tt> avoids this by having an extra
parameter, '<tt class="literal">n</tt>', which places a limit on
the number of characters read from the nominated file. Of course,
if n is too small, you get the source line in several pieces, but
this is usually avoided by making <tt class="literal">n</tt> (and
the size of the character array, <tt class="literal">s</tt>)
reasonably large, and ensuring that the returned string does indeed
end with the new line character.</p>
<p>The line read in is then converted to an integer by using the
function <tt class="function">strtol</tt> This has the
prototype</p>
<pre class="programlisting">
#include &lt;stdlib.h&gt; 
long int strtol (char const *nptr,
                 char **endptr, int base);
</pre>
<p>A check can be made that all digits have been read from the line
because <tt class="function">strtol</tt> returns a pointer,
<tt class="varname">endptr</tt>, to the character that caused it to
terminate. If this is not the '<tt class="literal">\n</tt>' that
fgets left at the end of the string it returned, then something has
gone wrong.</p>
<p>So to read a number, we now have something like:</p>
<pre class="programlisting">
#include &lt;stdio.h&gt; 
#include &lt;stdlib.h&gt;
#define LINELEN 150
char line[LINELEN]; 
char *next; 
int i;
fputs (&quot;Please enter lil: 11, stdout);
if (fgets (line, LINELEN, stdin) == NULL) {
  perror (&quot;'fgets' found an error&quot;); 
  exit (EXIT_FAILURE);
}
i = (int) strtol (line, &amp;next, 10);
if (*next 1= l\n') {
  fputs (
    &quot;'strtol' failed to convert all the line&quot;,
     stdout); 
  fputs (line, stdout);
  exit (EXIT_FAILURE);
}
</pre>
<p>Probably the only unfamiliar function in this example is
<tt class="function">perror</tt>, which prints the string given as
its parameter together with a message identifying the most recent
system error. In this case, it will explain why <tt class=
"function">fgets</tt> returned <tt class="literal">NULL</tt>:
perhaps it found end of file instead.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e263" id="d0e263"></a>Improving the
Example</h2>
</div>
<p>The next improvement I would make is, having read all the input
I wanted from the user to write it all out in some readily
comprehensible format. When (not if!) something goes wrong, this
allows the user to see what the computer thought he said and
compare it with what he claims he said (or actually said). Those
who have had to sort out a colleague's incomprehensible program and
get it to actually work will appreciate the subtleties of that
sentence!</p>
<p>I might format that output so that, with only minimal editing,
it could be fed directly back into the program to reproduce the
original output.</p>
<p>In any event, the input to a program provides a useful document
describing what that program was asked to do.</p>
<p>We can still improve on this. Why is that number being read in?
What is going to be done to it? The answers to those two questions
suggest that there are limits, or bounds, to legal values of that
number which are probably significantly less than the limits of the
type <tt class="type">int</tt>. So why not check them? And if the
entered number exceeds those bounds, print an error message and try
again.</p>
<p>But don't do so endlessly. several (say five) consecutive
failures suggests that the user is having difficulties with the
program. Or in my case, I am reading the requested numbers from a
command file (a text file written before the job starts and from
which the program reads the input it would otherwise read from the
terminal) and the list of answers I prepared when submitting the
job has got out of step with my program's questions.</p>
<p>So stop the program to allow (or force) the user to re-think
what he is doing before things go irretrievably wrong.</p>
<p>A final touch is to add a comment character. This is one which,
when encountered, causes the remainder of the line to be ignored.
As usual with comments, they do not have to be used (and I would
not do so in this case when entering input directly from a
terminal). But as most of my programs are run from command files,
they provide a useful way of sorting out the inevitable mismatches
between my dreams and reality.</p>
<p>We now have some relatively complex functionality that really
should not be coded inline in your program, but appear as a
function in its own right. Indeed, the previous example should
probably be a function as well.</p>
<p>Arguments that we have made the task of reading a number far too
complex, or are suffering from 'code bloat' and writing
unnecessarily large programs are not valid. We are using the
computer to protect ourselves from our own mistakes. We are
separating out an idea into a function of its own and we can reuse
the function in this, and our future programs, as we would
presently use <tt class="function">scanf</tt>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e290" id="d0e290"></a>The Final
Function</h2>
</div>
<p>My code for the function to do all this is in Listing 1. And I
should perhaps say that this is in K&amp;R C, rather than ISO C,
for code and compiler legacy reasons. But you should have no
difficulty converting this to the ISO standard.</p>
<p>Now we see that the fictional lecturer's opening 3-line example
has expanded to 77 lines, which is the precise reason why he did
not want to do this in the first place. But he could have given his
class a library with this function in it, and told them about this,
rather than <tt class="function">scanf</tt>. As existing code, it
would set an example of a desirable style, whilst, through the
'lower' and 'upper' limits,' forcing the students to think about
what reasonable ranges for their numbers would be.</p>
<p>Given my remarks above, and the comments in the Listing, I think
(hope) that what is going on is clear, but a few more remarks may
help.</p>
<p>First, my <tt class="function">get_int</tt> function does not
print out the value it will return as I regard that as the user's
prerogative.</p>
<p>Second, the comment character is implemented by using the
standard library function <tt class="function">strchr</tt> to
search the line read from the terminal for the comment character,
which is defined by the macro <tt class="function">COMMENT</tt>. If
found, it is replaced by the new line and end of string
characters.</p>
<p>Range checking the number entered by the user requires a longer
comment. It is reasonable to expect the user to want to return a
value that is anywhere within the bounds of the legal values
allowed for an <tt class="type">int</tt> on the host system. But
the range test must be made using only <tt class="type">int</tt>
arithmetic. For one thing, the compiler may support a subset of C
that has only <tt class="type">int</tt>. So we have to allow both
lower and upper to be legitimate data values and equality of
<tt class="varname">i</tt> to either of these must be permitted,
otherwise, there is a legal positive, and a legal negative, integer
which this function could never allow to be entered.</p>
<p>And if you do want to read in the largest possible positive (or
negative) integer, the symbols to use for '<tt class=
"literal">upper</tt>' (or '<tt class="literal">lower</tt>') are
<tt class="literal">INT_MAX</tt> (or <tt class=
"literal">INT_MIN</tt>) which are defined in the standard header
<tt class="filename">&lt;limits.h&gt;</tt>.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e346" id="d0e346"></a>A Test
Harness</h2>
</div>
<p>Having written any function, we should ask how to test it, and
my <tt class="function">get_int</tt> is no exception. Listing 2
provides a short program that uses <tt class=
"function">get_int</tt> to read a value and then <tt class=
"function">fprintf</tt> to write it out. This provides a simple
method of checking what <tt class="function">get_int</tt> does.</p>
<p>Deliberately writing a program with an endless loop, and then
requiring the user to force terminate the run with the Break key
(or however else his operating system kills errant programs) is a
little user unfriendly, but justified here because of the costs,
and negligible benefits, of doing something more humane.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e365" id="d0e365"></a>Some More
Extentions.</h2>
</div>
<p>There are still a number of things that need doing to <tt class=
"function">get_int</tt>. And these, I am going to leave to you.
When complete, they will provide a library of functions to help
your programs read in numbers safely.</p>
<p>What changes are needed to read in numbers of types <tt class=
"type">short int</tt> and <tt class="type">long int</tt>? And what
about the <tt class="type">unsigned</tt> variants of these, as well
as <tt class="type">unsigned int</tt>?</p>
<p>Then, how should the function be modified to read the floating
point types, <tt class="type">float</tt>, <tt class=
"type">double</tt> and <tt class="type">long double</tt> (together
with any others your compiler allows)?</p>
<p>How should a default value be introduced, which is returned if
the user enters a zero length line, or one containing only a
comment? What if the user does not want a default value, but your
function provides for one?</p>
<p>I spend a lot of time plotting graphs, so I have a variant of
this function which reads two numbers (the x- and y-co-ordinates of
the point to plot) from each line. And it treats there being only
one number on a line as an error. How would you write this? Both
integer and floating point versions are wanted.</p>
<p>Finally, and as a rather hard exercise which I don't know how to
do: how should <tt class="function">get_int</tt> be modified to
work in a windows' style programming environment? I await your
suggestions in a future issue of C Vu.</p>
<div class="sidebar">
<p class="title c2">Listing 1. The get_int function.</p>
<pre class="programlisting">
/* get-int.c Prompt for, read and check, an integer from Istdin */.
#include &lt;stdio.h&gt; 
#include &lt;stdlib.h&gt; 
#include &lt;string.h&gt; 
#define TRY_LIMIT 5 /* Retry limit for reading int.*/
#define LINE_SIZE 256 /* Maximum line length
               allowed.*/
#define COMMENT .'#'  /* Comment character.  */
/* get_int Writes the 'prompt' message to the
 * terminal, reads a line of text as the reply
 * and attempts to find an integer from it. Any
 * integer found is range checked such then &quot;
 * lower &lt;= i &lt;= upper&quot; is true. This is returned
 * as the function value. In the event of problems,
 * a message is printed, and the number is 
 * re-requested. After the retry limit is exhausted,
 * the function prints another message and aborts 
 * the program.    */        
int get_int (prompt, lower, upper)  
  char *prompt; /* Pointer to prompt message. */
  int lower; /* Lowest legal value allowed.   */
  int upper; /* Highest legal value allowed.  */
{
  char line[LINE_SIZE]; /* Input line buffer.  */
  char *com_posn; /* Position of any comment.  */
  char *next; /* Where strtol stopped.  */
  int i; /* Number read from the user.  */
  int try; /* Retry counter.  */
/* Loop per attempt to read the number 
 * from the user.  */
  for (try = 0; try &lt; TRY_LIMIT; ++try) 
  {
/* Prompt for the required number.  */
    fputs (prompt, stdout); 
/* Read a line of text from the terminal in reply.  */
    if (fgets(line, LINE_SIZE, stdin) == NULL)
    {
/* Something has gone badly wrong, possibly End of File.  */
      fputs (&quot;'get_int' found End-of-File.\n&quot;,
               stdout);
      exit (EXIT_FAILURE); /* Abort run
                 abnormally */
    }
/* Delete any trailing comment on the line. */
    if ((com_posn = strchr(line, COMMENT))!= NULL) 
/* A comment is present. Mask it out.  */
      strcpy (com_posn, &quot;\n&quot;);
/* Attempt to read an integer from the start of the line.  */
    i = (int) strtol(line, &amp;next, 10);
    if (! isspace(*next))
      fputs (  &quot;Failed to read anything from line.&quot;
                     , stdout);
    else 
    {
/* An integer was read. Is it in range?  */
      if ((i &gt;= lower) &amp;&amp; (i &lt;= upper))
      {
/* The number is in the expected range.  */
        return i; /* Successful exit.  */
      }
      else
      {
  /* The number is outside the expected range.*/
        fprintf (stdout, &quot;%s %d %s%d%s %d%s&quot;,
          &quot;The number&quot;,i,
          &quot;is not in the range [&quot;, lower,&quot;,&quot;
          , upper, &quot;].&quot; );
      }
/* If this is not the last try, ask for another line.   */
      if (try &lt; (TRY_LIMIT - 1))
      {
        fputs (&quot;Please try again.\n&quot;, stdout);
      }
/* When here, we have exhausted the retry limit without obtaining a suitable response.  */
    }  
    fputs (  &quot;\n'get_int' aborting program:&quot;
         &quot;retry limit reached.\n&quot;, stdout);
    exit (EXIT_FAILURE); /* Abort run abnormally.  */
  }
}
</pre></div>
<div class="sidebar">
<p class="title c2">Listing 2. The test function for 'get_int'.</p>
<pre class="programlisting">
/*: try_get_int.c A test program for 'get_int' function.*/
#include  &lt;stdio.h&gt;
int get_int()   /* Read integer from user.  */
int i;       /* Number read from user.  */
/*: main Main program entry point.  */
int main (argc, argv)
  int argc; /* (Unused) argument counter.  */
  char *argv[]; /* (Unused) arg pointer list.*/
{
  fputs (&quot;Use [* Break *] to terminate run.\n&quot;,
                   stdout);
  while(1) /* Loop forever. */
  {     
    i = get_int (&quot;Integer: &quot;, -1000, 2345);
    fprintf (stdout, &quot;Read %d.\n&quot;, i);
  }
}
</pre></div>
<p class="c3"><span class="remark">Editor's notes:</span></p>
<p class="c3"><span class="remark">This article was provided in
typed form, scanned and converted with OmniPage Pro 8.0. I think
that I have manually corrected all conversion errors but source
code in particular is notoriously difficult to scan correctly.
Typos are most likely to be the result of this process.</span></p>
<p class="c3"><span class="remark">Unfortunately I cannot easily
contact the author so I cannot raise the issue of what I believe is
an erroneous understanding of how strol works. I do not think that
this function terminates when the number is too large to store in a
long. My understanding is that it takes all input till the first
non-digit, regardless.</span></p>
<p class="c3"><span class="remark">There are other points that
readers might wish to comment on. The following are a few
ideas.</span></p>
<p class="c3"><span class="remark">I have left the author's code in
K&amp;R C because even today, C programnmers need to be able to
read legacy code written this way.</span></p>
<p class="c3"><span class="remark">I think there is probably a need
for an article (or more) on the differences between K&amp;R and ISO
C and how to convert legacy code to ISO C) aimed at those that have
recently learnt C. I hope someone will take up the
challenge.</span></p>
<p class="c3"><span class="remark">I wonder if any reader would
like to comment on why some programmers use single character
strings where a char would seem more appropriate. In last issue's
student code we had %s used to output single spaces (actually in
that case there was no need for a format specifier). In Posul's
code he over-writes his comment character by using strcpy. Can
anyone tell me why he did not use a simple assignment such
as:</span></p>
<pre class="programlisting">
*com_posn = '\n';
</pre></div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
