TAL Programmer's Guide
Mixed-Language Features of TAL
Mixed-Language Programming
17–2 096254 Tandem Computers Incorporated
You can specify the location of a named or private data block. For more information,
see Section 14, “Compiling Programs.”
LANGUAGE Attribute Before calling an external routine, a TAL module must include an EXTERNAL
procedure declaration for the external routine. If you are using a D-series TAL
compiler, you can use the LANGUAGE attribute in the declaration to specify that the
external routine is a C, COBOL85, FORTRAN, or Pascal routine. For example, if the
external routine is a C routine, you can specify LANGUAGE C following the routine
identifier in the EXTERNAL procedure declaration:
PROC c_func !EXTERNAL procedure declaration
LANGUAGE C; !LANGUAGE attribute
EXTERNAL; !EXTERNAL option
If the C, COBOL85, FORTRAN, or Pascal routine has formal parameters, the
LANGUAGE attribute follows the formal parameter list in the EXTERNAL procedure
declaration:
PROC c_func (a, b, c) !Formal parameter list
LANGUAGE C; !LANGUAGE attribute
STRING .a, .b, .c; !Formal parameter declarations
EXTERNAL; !EXTERNAL option
If you are not sure of the language, you can specify LANGUAGE UNSPECIFIED in the
EXTERNAL procedure declaration:
PROC some_proc !EXTERNAL procedure declaration
LANGUAGE UNSPECIFIED; !LANGUAGE attribute
EXTERNAL; !EXTERNAL option
Here are guidelines for specifying a EXTERNAL procedure declaration:
Always include the EXTERNAL keyword if you use the LANGUAGE attribute.
Specify no more than one LANGUAGE attribute in a declaration.
Omit the LANGUAGE attribute if the external routine is written in TAL.