Flags

#### Search Results

Search

# Flags

The structure `parameter_description` has an element `flags` that contains information about the status of the parameter. Also the functions `nni_init_parm*` allow specifying some of these flags when initializing a parameter. The individual flags can be combined with a logical `OR` in the element `flags`. The following flags are defined in the header file natni.h. This file is contained in the directory <install-dir>/natural/samples/sysexnni.

Return Code | Meaning
--- | ---
`NNI_FLG_PROTECTED` | Parameter is write protected.
`NNI_FLG_DYNAMIC (*)` | Parameter is dynamic (variable length or x-array).
`NNI_FLG_NOT_CONTIG (*)` | Array is not contiguous.
`NNI_FLG_AIV (*)` | Parameter is an AIV or INDEPENDENT variable.
`NNI_FLG_DYNVAR (*)` | Parameter has variable length.
`NNI_FLG_XARRAY (*)` | Parameter is an x-array.
`NNI_FLG_LBVAR_0` | Lower bound of dimension 0 is variable.
`NNI_FLG_UBVAR_0` | Upper bound of dimension 0 is variable.
`NNI_FLG_LBVAR_1` | Lower bound of dimension 1 is variable.
`NNI_FLG_UBVAR_1` | Upper bound of dimension 1 is variable.
`NNI_FLG_LBVAR_2` | Lower bound of dimension 2 is variable.
`NNI_FLG_UBVAR_2` | Upper bound of dimension 2 is variable.

Only the flags marked with `(*)` can be explicitly set in the functions `nni_init_parm*`. The other flags are automatically set by the interface according to the type of the parameter.

If one of the `NNI_FLG_*VAR*` flags is set, the array is an x-array. In each dimension of an x-array only the lower bound or the upper bound, not both, can be variable. Therefore for instance the flag `NNI_FLG_LBVAR_0` may not be combined with `NNI_FLG_UBVAR_0`.

If `NNI_FLG_DYNAMIC` is on, also `NNI_FLG_DYNVAR`, `NNI_FLG_XARRAY` or both are on. If both are on, the parameter is an x-array with elements of variable length.