VERB
9.5A
The VERB instruction identifies the parameters and data types that can be used for an user defined verb. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
poslist
Optional. The positional parameters.
nonposlist
Optional. The non-positional parameters.
keylist
Optional. The keyword parameters.
Flags Affected: NONE
Note the following:
This instruction has no impact on the generation of the a PLB program until a user creates a PLB sub-routine, LROUTINE, ROUTINE, PROCEDURE, or FUNCTION whose execution label is the same as the label specified for the VERB definition.
The positional parameters {poslist} must precede all other parameter definitions in the VERB parameter list. The positional parameters define prototypes of variables the must be specified when the user-defined verb is used in a program. The positional parameters are compiled as parameters on the generated CALL instruction when the user-defined verb is executed. The positional program types can be any of the allowed prototype definitions declared using the following format:
#type
Example:
A single non-positional parameter {nonposlist} can be defined in the VERB
parameter list. This parameter defines the type(s) of parameters that can be included in the user-defined
verb variable list. This parameter definition can be defined in the VERB
parameter list anywhere after the {poslist} parameters. The non-positional program types can be any of
the allowed prototype definitions declared using the following format:
=type
Example:
Multiple keyword parameters can be defined in the VERB parameter list {keylist}. The keyword parameters can be declared in the VERB parameter list after the {poslist} parameters. The keyword parameters can be specified in the VERB parameter list with or without up to five (5) operands that are assigned to the keyword using an equal sign (=). The optional keyword operands must follow an equal sign and are delimited by a colon (:) character when more than one operand is declared. The keyword name must be provided using the same characters as allows for a PLB label. The keyword parameter program types can be any of the allowed prototype definitions declared using the following formats:
Example:
Example:
After VERB definition has been declared, the end-user application must provide a sub-routine, LROUTINE, ROUTINE, PROCEDURE, or FUNCTION that has the same execution label name as specified for the VERB definition.
Once the VERB definition has been declared, the user-defined verb can be invoked like any normal PLB statement. The positional parameters for the VERB parameter definitions must be specified and the appropriate data types must match the prototype data type(s) that have been defined. The non-positional and keyword parameters are optional and must be specified after the positional parameters. The non-positional and keyword parameters are retrieved from the VERB parameter list using the GETPARM and LOADPARM instructions after the user-defined routine has started executing.
The allowed VERB prototype types are defined as follows:
|
Prototype |
Allowed Parameter |
|
ARRAY |
any array variable |
|
AFILE |
an afile variable |
|
ANY |
any type of variable |
|
CARRAY |
1, 2, or 3 dimensional array |
|
CARRAY1 |
a 1 dimensional character variable array |
|
CARRAY2 |
a 2 dimensional character variable array |
|
CARRAY3 |
a 3 dimensional character variable array |
|
CNVAR |
any character or numeric variable |
|
CNVARLIT |
any character or numeric variable |
|
COMFILE |
a comfile variable |
|
CVAR |
any character variable |
|
CVARLIT |
a character variable or literal |
|
FILE |
a file variable |
|
IFILE |
an ifile variable |
|
LIST |
a list or varlist |
|
LABEL |
a program label (9.5B) |
|
NVAR |
a numeric variable |
|
NVARLIT |
a numeric variable, numeric literal, or decimal constant |
|
NARRAY |
a numeric array variable |
|
NARRAY1 |
a 1 dimensional numeric array variable |
|
NARRAY2 |
a 2 dimensional numeric array variable |
|
NARRAY3 |
a 3 dimensional numeric array variable |
|
PFILE |
a pfile variable |
|
OBJECT |
an object variable |
|
VAR |
any single valued variable |
|
VARLIT |
any single valued variable or literal |
See Also: Example Code, GETPARM, LOADPARM, RESETPARM, Compiler Directives
![]() |