\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{printVd}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{printVd}},
{\tt \manName{fprintVd}},
{\tt \manName{scanVd}},
{\tt \manName{fscanVd}}
-- routines for printing and reading double precision vectors.
}
\manSection{USAGE}
\cverbatim
#include <stdio.h>

printVd (fmt, v, size)
   const char *fmt;
   double *v;
   int size;

fprintVd (fp, fmt, v, size)
   FILE *fp;
   const char *fmt;
   double *v;
   int size;

scanVd (v, size)
   double *v;
   int size;

fscanVd (fp, v, size)
   FILE *fp;
   double *v;
   int size;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt v} --}
Vector to be printed.
\manItem{{\tt size} --}
Size of the vector.
\manItem{{\tt fp} --}
Pointer to file buffer.
\manItem{{\tt fmt} --}
{\tt printf} style format string.
\manSection{RESTRICTIONS}
These routines must be called from the planning level.
\manSection{DESCRIPTION}
These routines provide a convenient interface for reading and writing
double precision vectors.

{\tt printVd()} prints a vector on {\tt stdout}. The format string is
a {\tt printf()} style format string, which is assumed to contain
only one {\tt \%} definition (see {\tt printf(3)}).
This defines the format with which all the numbers in the vector will
be printed, with an additional space automatically being
inserted between each number.
Material in the format string prior to and following the {\tt \%} definition
is printed verbatim, prior to and following the vector information.

For example, 
\cverbatim
   printVd("before: %5.2f after:\n", v, 4);
@endcverbatim
\noindent would print:
\cverbatim
   before: 34.12  0.00  1.23 -4.50 after:
@endcverbatim
(assuming {\tt v} contains those numbers).

{\tt fprintVd()} is identical to {\tt printVd()} except that
the output is routed to the indicated stream.

{\tt scanVd()} reads a vector in from {\tt stdin}. The vector is
read using the {\tt \%f} format of {\tt scanf(3)}.

{\tt fscanVd()} is identical to {\tt scanVd()} except that its
input is obtained from the indicated stream.
\manSection{DIAGNOSTICS}
The {\tt scanVd} functions return {\tt 1} if successful, {\tt 0} if the read failed,
or {\tt EOF} if an end-of-file was encountered.

Calling these routines from the control level will cause the program
to crash.
\manSection{SEE ALSO}
\raggedright
{\tt copyV(3)}, {\tt addVf(3)}, {\tt addVd(3)}, {\tt printVf(3)}.
\manEnd
\end
