CTX_Base :: Parm - Retrieving parameters
The function is called from within a user context function in order to retrieve parameters passed by the user function. Parameters must have been set before calling ExecuteFunction() by SetParm().
Parameters can be retrieved by position or key name, when the parameter string contains keyword parameters. The parameter value is returned as 0-terminated string.
The Parm() function returns the parameter value in a work area. This will be destroyed, when retrieving the next parm. Hence, function calls like F(Parm(1), Parm(2)) will not work properly. The result from at least one of the Parm() calls must be moved to a local area.
Implementation overview
- Get parameter value at position
CTX_Base :: Parm ( parm_no ) - Get parameter by key word
CTX_Base :: Parm ( parm_key )
Implementation details
-
Get parameter value at position
const NString & CTX_Base  :: Parm ( int32 parm_no )
The first parameter has position 1.
- parm_no
- Parm number
The parameter number is the position of the parameter in the function call. The first parameter has position 1.
to list
- parm_no
- Parm number
-
Get parameter by key word
const NString & CTX_Base  :: Parm ( NString &parm_key )
Keyword parameters can be defined in three ways in the parameter string:
- name=value;
- name:value
- name(value)
Passing the keyword name, the function will return the value from the parameter string, when being defined.
- parm_key - Parameter keyword
to list