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

Table Of Contents
Mixed-Language Programming for TNS/R and
TNS/E Native Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
8-6
Considerations When Interfacing to pTAL
else
return( NULL );
}
4. 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);
5. This declarations of external routines are written in both of the styles described in
this section for calling pTAL procedures:
void c_name (short *);
#pragma function c_name (tal, alias (“tal^name”))
/* function declaration...*/
_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 *,
short, short *, long);
Considerations When Interfacing to pTAL
This subsection provides guidelines for writing programs composed of pTAL and native
C or C++ modules. All the discussion that pertains to native C also pertains to native
C++, unless otherwise noted. The discussion assumes that you have a working
knowledge of pTAL and C, and are familiar with the contents of the:
pTAL Conversion Guide
pTAL Reference Manual