TAL Programmer's Guide
Mixed-Language Features of TAL
Mixed-Language Programming
17–8 096254 Tandem Computers Incorporated
In the following example, the caller passes a parameter pair and the current-length
parameter to the procedure declared in the preceding example:
PROC out_proc_caller;
BEGIN
INT cur_len; !Declare simple variable CUR_LEN
LITERAL max_len = 20;
STRING .name[0:max_len – 1];
name ':=' "KENNETH";
cur_len := 7;
CALL out_procedure (name:max_len, cur_len);
END; !Compiler passes address of CUR_LEN
Omitting Actual Parameter Pairs
If you want to omit an optional parameter-pair unconditionally in the actual
parameter list, substitute a comma for the omitted parameter pair. You cannot omit
half of a parameter pair.
For example, suppose the called routine declares the optional parameter pair
VALUE2:VALUE3 as follows:
PROC some_procedure (value1, value2:value3, value4)
EXTENSIBLE;
INT value1;
STRING .value2; !First half of optional parameter pair
INT value3; !Other half of optional parameter pair
INT .value4;
The caller can omit the optional parameter pair from its CALL statement, like this:
INT val_1, val_4;
CALL some_procedure (val_1, , val_4);
!Comma replaces omitted parameter pair
As of the D20 release, you can omit an optional parameter-pair conditionally. Use the
$OPTIONAL standard function as described in Section 13, “Using Procedures.”
ENV Directive In TAL, you use the ENV directive to specify the run-time environment of a D-series
object file as described later in this section. The run-time environment is either:
The CRE, which provides services for mixed-language programs
A C, COBOL, FORTRAN, Pascal, or TAL run-time environment outside the CRE
HEAP Directive In TAL, you can set the size of the user heap in the CRE, if ENV COMMON is also in
effect for the MAIN routine. The user heap, named #HEAP, is a shared CRE resource
that all routines in your program can access directly or indirectly as described later in
this section.