TAL Programmer's Guide

Mixed-Language Features of TAL
Mixed-Language Programming
17–6 096254 Tandem Computers Incorporated
Parameter Pairs A TAL parameter pair consists of two formal parameters (connected by a colon) that
together describe a single data type to FORTRAN or Pascal routines. Some D-series
system routines require that callers pass actual parameter pairs (as described in the
Guardian Application Conversion Guide).
Table 17-1 lists the parameter types in other languages that correspond to the TAL
parameter pair.
Table 17-1. Parameter Pair Type Correspondence
Language Type
C Not applicable
COBOL Not applicable
FORTRAN CHARACTER *length
Pascal FSTRING(
*
) or FSTRING(length)
Declaring Parameter Pairs
When you declare a TAL routine, you can include a parameter pair by specifying a
string parameter and a length parameter separated by a colon:
PROC in_procedure (astring:length) !Parameter pair
LANGUAGE PASCAL;
STRING .EXT astring; !Declare string parameter
INT length; !Declare length parameter
EXTERNAL;
The string and length parameters of a parameter pair have the following
characteristics:
Parameter Pass By Formal Parameter Actual Parameter
String
parameter
Reference A standard or extended
STRING simple pointer
A STRING array or simple pointer declared
inside or outside a structure
Length
parameter
Value A directly addressed
INT simple variable
An INT expression that specifies the length,
in bytes, of the string parameter
If the called routine does not change the length of the string parameter, the length
parameter represents the maximum size, the initial size, or the current size of the
string parameter.