# Synopsis

(macro) PDX_MSGT map_DefineParameter(long option, PDX_MSGT param, MAP_PARAM_TYPE type, void *def_addr, void def_val)

# Purpose

Define a parameter.

# Description

A parameter will be defined for subsequent use with map_EnableMapping. Mapping parameters are used to convey additonal information to mapping functions. Mapping parameters can not be redefined, thus an error will be returned if param has previously been defined. The parameter defined by calling map_DefineParameter is not specific to any mapping table. See the map_intro man page for additional information on using mapping parameters.

The param argument must be a #define generated by mtc. This ensures that the numeric identifier for the parameter will be unique across all of PDElib and the calling application. The parameter must be defined in a message table (with an empty message text string). The message table entry for a parameter named ASYS_TOL in a message table for subsystem ASYS would simply be:

.RS 3 TOL ""; .RE

The type argument must be one of the following:

.IP MAP_DEFINE 13 A #define value generated from mtc. This type is typically used to simulate a C enumeration and allows a symbolic value to be used rather than a simple integer. The define must be generated from mtc. .IP MAP_BOOLEAN A boolean value. .IP MAP_LONG A long integer value. .IP MAP_DOUBLE A double value. .LP

The def_addr argument specifies the address of a static variable containing the default value for the parameter to be used when the parameter is not specified to map_EnableMapping. The def_val argument defines the default value to set @a *def_addr to.

An example of defining a parameter named ASYS_TOL to be of type double with a default value of .001 is shown below:

.RS 3 .nf map_DefineParameter ( MAP_NOOPT, ASYS_TOL, MAP_DOUBLE, &asys_tol, .001); .fi .RE

# Input

## option

Options (not used)

## param

Parameter being defined (must be a #define generated from mtc)

## type

Type of parameter

## def_addr

Location of the default value for this parameter

## def_val

Default value for the parameter

# Return

MAP error code