TAL Programmer's Guide

Using Parameters
Using Procedures
096254 Tandem Computers Incorporated 11–35
Reference Parameter Address Conversions
When you pass a reference parameter, its addressing mode should match that of the
formal parameter. If not, the compiler converts the addressing mode of the actual
parameter to match that of the formal parameter. When converting an address, the
compiler assumes that a STRING pointer contains a byte address and that a pointer of
any other type contains a word address. In some conversions, part of the address is
lost.
Table 11-6 lists combinations of addressing modes and the kind of address that results
in each case.
Table 11-6. Reference Parameter Address Conversions
Formal Parameter’s
Addressing Mode
Actual Parameter’s
Addressing Mode Converted Address of Actual Parameter
Standard byte Standard word Standard byte address
*
Standard word Standard byte Standard word address
**
Standard byte Extended word Standard byte address in segment 0
***
Standard byte Extended byte Standard byte address in segment 0
***
Standard word Extended word Standard word address in segment 0
***
Standard word Extended byte Standard word address in segment 0
**
***
Extended Standard Extended address
Extended word Extended byte No address conversion; the compiler issues a warning
*
The most significant bit is lost.
**
The left-or-right-byte specifier—bit 15 of a standard byte address, bit 31 of an extended byte
address—is lost or absent. The converted address might access the wrong byte in a word. The
compiler issues a warning.
***
The segment-number specifier—bits 2 through 14 of an extended address—is lost, so the
converted address defaults to segment 0, the current user data segment. The compiler issues
a warning.
Parameter Pairs You can include formal parameter pairs when you declare a procedure or
subprocedure. A parameter pair consists of two formal parameters connected by a
colon that together describe a single data type to some programming languages. For
information on using parameter pairs, see Section 17, “Mixed-Language
Programming.”