GETPARM


9.5A

 

The GETPARM instruction retrieves non-positional and keyword parameters from the execution parameter list for a user-defined VERB. The instruction uses the following format:

 

 

[label]

GETPARM

{keyvar}[,{var1},{var2},{var3},{var4}]

 

Where:

label

Optional. A Program Execution Label.

keyvar

Required. A Character String Variable or a typeless VAR variable pointer that receives the keyword name of the next parameter in the user-defined verb execution list.

var1 - var 5

Optional. A typeless VAR variable pointer that receives the address of any operands that have been assigned to the next parameter in the user-defined verb execution list.

Flags Affected: OVER

Note the following:

  1. Starting with the first non-positional or keyword parameter specified in the execution parameter list, the parameters are returned one at time for each GETPARM instruction that is execution.

  2. The GETPARM instruction returns the keyword name of the user-defined verb along with any optional operands for the parameter.

  3. If a non-positional parameter is encountered, the keyword that is returned is NULL.

  4. The non-positional and keyword parameters can be specified as many times as needed when the user-defined verb is executed.

  5. For any unused typeless VAR variables, the VAR pointer address is cleared such that the TYPE instruction returns a zero value for the type value.

  6. The OVER flag is set if there are not more parameters in the user-defined verb execution list.

  7. The RESETPARM instruction resets the execution parameter list such that the next GETPARM instruction that is executed retrieves the first parameter in the user-defined verb execution list.

  8. When a user-defined verb is executed, the parameter execution list can contain the same keyword reference in list of parameters more than once.

  9. The user-defined execution list instance exists only for the current call stack level that was established when the user-defined verb was executed using an implicit CALL instruction. If the user-defined routine calls to another routine, the previous call stack level preserves the user-defined execution list pointers. This allows user-defined verbs to be executed, nested, and returned to any call stack level while keeping the execution list parameter pointers valid for that stack level.

  10. The GETPARM only retrieves the non-positional and keyword parameters from the user-defined execution list which are optionally included by the execution of the user-defined verb.

 

 

See Also: VERB, LOADPARM, RESETPARM, System Interface Instructions

 



PL/B Language Reference GETMODE GETSTRING