company logo

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.

Notes:

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.

Return value:   - Title unknown ( NString  )

Implementation overview

Implementation details

  1. 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.

  2. to list
  3. 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
  4. to list