\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{getpar}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{getparInteger}},
{\tt \manName{getparFloat}},
{\tt \manName{getparIdentifier}},
{\tt \manName{getparString}}
-- routines to read values from an RCI parameter set.
}
\manSection{USAGE}
\cverbatim

getparInteger (ival, key, handle)
  int *ival;
  const char* key;
  int handle;

getparFloat (fval, key, handle)
  float *fval;
  const char* key;
  int handle;

getparString (sval, key, handle)
  char **sval;
  const char* key;
  int handle;

getparIdentifier (sval, key, handle)
  char **sval;
  const char* key;
  int handle; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt key} --}
Key name associated with the parameter.
\manItem{{\tt handle} --}
Parameter set handle returned by {\tt rciParameters()}.
\manItem{{\tt ival} --}
Place to return integer value.
\manItem{{\tt fval} --}
Place to return floating point value.
\manItem{{\tt sval} --}
Place to return pointer to string.
\manSection{RESTRICTIONS}
These routines must be called from the planning level.
\manSection{DESCRIPTION}
These routines are used to read parameters associated with an
RCI parameter set (see {\tt rciParameters(3)}). 

In general, the routines search the parameter set for a parameter
of the indicated type which has the specified name ({\tt key}).
If this is found, the routine returns {\tt 1}. If no parameter in the set
has that name, then {\tt 0} is returned, and if the set has a parameter with
that name but the type is incorrect, {\tt -1} is returned.

{\tt getparInteger()} returns an integer from the parameter set.

{\tt getparFloat()} returns a floating point value
from the parameter set, converting an integer type to a float if
necessary.

{\tt getparIndentifier()} returns an indentifier from the parameter
set (an identifier is an alphanumeric string, including underscores
and dollar signs,
that does not begin with a digit).

{\tt getparString()} returns a string from the parameter set,
converting an indentifier to a string if necessary.
\manSection{DIAGNOSTICS}
These routines will abort the program if called from the control level.
\manSection{BUGS}
The access functions to the parameter sets are rather crude; 
a better way would probably be to have one function which returns 
the value and the type. But while we're doing this, we should probably
extend the facility to allow aggregates as well, and then we're off
into the wild blue yonder.
\manSection{SEE ALSO}
\raggedright
{\tt rciParameters(3)}, {\tt setpar(3)}.
\manEnd
\end
