C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

if (__status_eq(c_code))
return( (short *)blk_addr );
else
return( NULL );
}
5. This function prototype and FUNCTION pragma:
void segment_allocate (short, long, short *, short);
...
#pragma function segment_allocate (tal, alias
(SEGMENT_ALLOCATE_), variable)
is equivalent to this interface declaration:
_tal _variable short SEGMENT_ALLOCATE_ (short, long,
short *, short);
6. Here are some more examples of interface declarations for calling TAL procedures:
_tal _variable _cc_status SEGMENT_DEALLOCATE_ (short, short);
_tal _variable _cc_status READ (short, short *, short,
short *, long);
_tal _extensible _cc_status READX (short, char _far *,
short, short *, long);
_tal void c_name = "tal^name" (short *);
Interfacing to TAL
This subsection provides guidelines for writing programs composed of TAL and HP TNS C modules
for NonStop systems. This discussion assumes that you have a working knowledge of TAL and C
and are familiar with the contents of these manuals:
TAL Programmer’s Guide
TAL Reference Manual
For information on calling TAL routines from another language, see the manual for TNS COBOL,
FORTRAN, or D-series Pascal.
Using Identifiers
TAL and C identifiers differ:
TAL and C have independent sets of reserved keywords.
TAL identifiers can include circumflexes (^), whereas C identifiers cannot.
The C compiler is case-sensitive; the TAL compiler is not case-sensitive.
To declare variable identifiers that satisfy both compilers:
Avoid using reserved keywords in either language as identifiers.
Specify TAL identifiers without circumflexes.
Specify C identifiers in uppercase.
You can declare TAL-only or C-only routine identifiers and satisfy both compilers by using the public
name option in:
Interface declarations in C
EXTERNAL procedure declarations in TAL
Interfacing to TAL 101