C/C++ Programmer's Guide (G06.25+)

Introduction to HP C and C++ for NonStop Systems
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
1-18
Features of TNS/E Native C and C++
International Standard ISO/IEC 14882:2003(E) Programming Languages -- C++
(a newer standard).
HP includes several extensions to ISO/ANSI standard C that make C an effective
language for writing applications that execute under the HP NonStop operating system.
Some of these features are:
Access to several types of physical files
There is an extensive set of I/O library routines that enable you to access many
different types of physical files, including:
°
C disk files, which are odd-unstructured files and have a file code of 180
°
EDIT disk files, which have a file code of 101
°
Processes
°
Terminal s
°
$RECEIVE
Two file-reference models
There are two sets of input and output routines; each set has its own method of
tracking, maintaining, and referring to a file. These methods, called file-reference
models, are:
°
The ANSI model, which uses FILE pointers to identify files
°
The alternate or UNIX-style model, which uses file descriptors to identify files
With two file-reference models available, you can select the model whose I/O
services best suit the needs of your application. For more details, see Section 4,
Using the C Run-Time Library.
Access to Guardian system procedures
You can call procedures in the Guardian system library using the cextdecs
header file in the Guardian environment or the cextdecs.h header file in the OSS
environment.
Access to Open System Services system calls and library calls
You can call routines that are part of the Open System Services library.
Access to procedures written in other languages
TNS programs can call procedures written in C, C++, TNS COBOL, FORTRAN,
D-series Pascal, and TAL. Native programs can call procedures written in C, C++,
native COBOL, and pTAL.
Access to a NonStop SQL/MP database or a NonStop SQL/MX database
Your TNS/R native C or C++ program can interface to a NonStop SQL/MP or
NonStop SQL/MX database using embedded SQL.