CRE Programmer's Guide
Introducing the CRE
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
1-8
Advantages of Using the CRE
.
Advantages of Using the CRE
In the Guardian environment, the CRE has these advantages:
•
Removes many restrictions on mixed-language programming. For example, in the
Guardian environment all routines in a program can share access to the standard
files (standard input, standard output, and standard log) and $RECEIVE, not just
those written in the same language. (In the OSS environment, the file system
supports standard files explicitly.)
•
Allows a routine to be written in the language best suited for its task. For example:
°
A program can have its file operations written in COBOL and its list
management in TAL or C.
°
A software development group might have a set of standard FORTRAN
routines that it uses to build its TAL or COBOL programs. The CRE makes
these routines available to all programs, regardless of the language.
•
Allows access to functions that are not defined as part of its own language or
run-time library. The CRE functions can be called from any language.
•
Enables you to convert applications from one programming language into another
programming language in phases. For example, suppose you need to convert an
application from TAL into C. You can divide the routines in the TAL application into
functional sets. As you convert each set of routines to C, you can test each set by
binding the TAL and C routines into one program.
•
Allows easier porting of programs to HP NonStop servers. Not only does the CRE
make it easier to port mixed-language programs, but you can rewrite performance-
critical routines in the language best suited for running on NonStop servers.
Table 1-3. Language Support in TNS CRE and native CRE
Application Language TNS CRE Native CRE
COBOL Yes (using the COBOL85 or
cobol compiler)
Yes (using the ECOBOL, ecobol,
nmcobol, or NMCOBOL compiler)
FORTRAN Yes No
CYes Yes
C++ Yes Yes
TAL Yes No
pTAL No Yes
Note. The CRE does not support mixed TNS and native programs (that is, programs that
contain both TNS object code/accelerated object code and TNS/R or TNS/E native object
code).