FPUTS  - put a string on a stream

     fputs(s, stream)

     return EOF on error

        fputs() writes the null-terminated string pointed to by s to
     the named output stream.

FGETS - get a string from a stream

     char *fgets(s, n, stream)

        fgets() reads characters from  the  stream  into  the  array
     pointed  to  by  s, until n-1 characters are read, a NEWLINE
     character is read and transferred to s, or an EOF  condition
     is  encountered.   The string is then terminated with a null
     character.  fgets() returns its first argument.

From john@ed.aisb Thu May 28 13:30:11 1992
Received: from terra.aisb.ed.ac.uk by aisb.ed.ac.uk; Thu, 28 May 92 13:30:09 BST
From: john@ed.aisb
Date: Thu, 28 May 92 13:30:18 BST
Message-Id: <6381.9205281230@terra.aisb.ed.ac.uk>
To: ianport@ed.aisb
Subject: Re:  Not urgent
Status: RO

Yes, your line of code actually has undefined meaning.  The arguments
of a function and the sub-expressions of an expression are not evaluated
in any defined order according to the C standard, I believe.  Thus you are
lucky that your line works -- it isn't portable and an optimizing compiler
could make it do quite different things.

Note that the line below is also incorrect:

while(*point != EOFcoord) 
  fprintf( ezdout, "%d %d ", object.x + *point, object.y + *point++), point++;

because it accesses the same *point (the first time) at a time when that value
is indeterminate.  The , between the call to printf and the second ++ will
ensure that the increment happens after the previous expression component
(printf) has been evaluated, since the comman operator is also defined as a
sequencing point like semicolon (note that the comma operator isn't what is
used for separating the arguments in a function call -- that just looks very
similar!).

The legal way to do what you want is to use subscripting and then increment
point by two after the statement.

John.


