setpar(3)

NAME
setparInteger, setparFloat, setparIdentifier, setparString -- routines to set values in an RCI parameter set.

USAGE
setparInteger (ival, key, handle)
  int ival;
  const char *key;
  int handle;

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

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

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

ARGUMENTS

key --
    Key name associated with the parameter.

handle --
    Parameter set handle returned by rciParameters(); the parameter set must be opened with the write option set.

ival --
    Integer value.

fval --
    Floating point value.

sval --
    Pointer to string value.

RESTRICTIONS
These routines must be called from the planning level.

DESCRIPTION
These routines are used to set parameters associated with an RCI parameter set (see rciParameters(3)).

In general, the routines place a parameter of the indicated type into the parameter set under the name specified by key. If this replaces a previous parameter, then the routine returns 1; otherwise, the routine returns 0.

setparInteger() places an integer into the parameter set.

setparFloat() places a floating point value into the parameter set.

setparIndentifier() places an indentifier into the parameter set (an identifier is an alphanumeric string, including underscores and dollar signs, that does not begin with a digit).

setparString() places a string into the parameter set.

DIAGNOSTICS
The setpar routines return 0 (and take no action) if the parameter set was not opened for writing. The routines return -1 if the system runs out of memory, and setparIdentifier() returns -1 if its argument is not an identifier.

These routines will abort the program if called from the control level.

SEE ALSO
rciParameters(3), getpar(3).