Input Lines

Input lines describe the values (arguments) that the external call passes to the external routine during invocation, and the mechanisms by which the external call passes the arguments. The number of input lines in a zcentry must equal the number previously specified by the INPUTS keyword in the routine line. If the INPUTS keyword in the routine line defaults or is set to zero (0), the zcentry should contain no output lines. Any input lines in the zcentry must precede the output lines.

The format for the input line is:

	INPUT inpkeyword=value [, ... ]
	Valid inpkeywords:
	* MECHANISM = VALUE | REFERENCE | DESCRIPTOR
	* POSITION = number
	* TYPE = DOUBLE | FLOATING | G_FLOATING | 
	H_FLOATING | LONG | QUAD | STRING | 
	BYTE | BYTEU | WORD | WORDU | LONGU
	[QUALIFIER =] CONSTANT | OPTIONAL | 
	OPTIONAL_0 | DEFAULT | REQUIRED
	VALUE = number | string
	

(*) - Denotes required keyword

The order of the input lines in the external call table corresponds to the sequence of the input arguments in the actual external call.

Input line keywords and their values must appear on a single MACRO line. MACRO lines may be continued by terminating them with a dash.

Example:

	GTM>DO &COMP(expr1,expr2,expr3)
	or

	GTM>SET X=$ZC(expr1,expr2,expr3,expr4)	
	

The following table shows the order of input lines for this examNote that the first $ZCALL argument specifies the callname.

Order of Input Arguments in External Call Table

INPUT ARGUMENTS

ARGUMENT DESCRIBED BY

Externref

$ZCALL

expr1

expr2

INPUT LINE1

expr2

expr3

INPUT LINE2

expr3

expr4

INPUT LINE3

The TYPE keyword describes the data type of the input line arguments. The table in the previous section on the Return line lists all external call data types supported by GT.M. The appropriate data type depends on the function of the external routine. For example, a routine to calculate the square root of a real number typically requires one of the floating point data types, and a routine to manipulate strings requires the string data type.

The MECHANISM keyword specifies the mechanism by which the external call passes the input arguments to the external routine.

The following table lists the argument passing mechanisms.

Argument Passing Mechanisms

MECHANISM

EXPLANATION

APPLIES TO:

INPUT

OUTPUT

VALUE

Pass argument by value

X

REFERENCE

Pass argument by referring to an address

X

X

DESCRIPTOR

Pass argument by referring to an address of a VMS

descriptor

X

X