gtpa2m0uApplication Programming

Understanding High-Level Language Concepts in the TPF System

This chapter introduces the terms and concepts used throughout this publication. Some of the terms describe features of C language and C++ language. See the user's guide, programmer's guide, and language reference for the IBM C or C++ compiler on the System/390 platform used by your installation for a more detailed understanding of these terms. See "IBM High-Level Language Books" for a list of IBM C and C++ compiler publications on the System/390 platform.

Other terms have special meaning in the TPF system environment. There is a glossary of TPF terms in the TPF Library Guide.

Note on Terminology

The use of the term load module supersedes that of C load module. Throughout this book, you will see C load module, which is a type of load module. For historical reasons, load modules on the TPF system were referred to as C load modules. The more generic term, load module, is used wherever possible so as not to be associated with a specific language.

See "E-Type Program Chart and Program Attributes" for more information about the types of load modules.

Terminology is important to understand the concepts discussed in this chapter. The following is a list of some important terms:

Source file
This file consists of C, C++, or assembler language statements that define the actions of a program. A compiler or assembler reads this file as input.

Object file
A compiler or assembler output file that is suitable as input to a linkage editor. In the TPF system, object files are included in a load module as designated by the load module build script.

Load module
All or part of a computer program in a form that is suitable for loading into main storage for execution. A load module is usually the output of a linkage editor.

Dynamic link library (DLL)
A collection of one or more functions or variables gathered in a load module and executable or accessible from a separate DLL application load module.

DLL application
An application that can reference imported functions or imported variables in a DLL.

Mangling
The encoding during compilation of identifiers such as function and variable names to include type and scope information.

Bind
To combine one or more control sections or program modules into a single program module, resolving references between them, or to assign virtual storage addresses to external symbols.

Binder
The DFSMS/MVS program that processes the output of language translators and compilers into an executable program. It replaces the linkage editor and batch loader in the MVS/ESA or OS/390 operating system.

The word program is used generically to refer to processes and not just to the source file or executable load module.

The TPF system supports online programs written in C, C++, and System/390 assembler. Before its standard C support, the TPF system supported a nonstandard implementation of a C language subset known as TARGET(TPF) (from the compiler option that it required). TARGET(TPF) support is completely separate from standard C support and is no longer enhanced or used by the TPF system, although it is still available for legacy applications that have not been updated or migrated to standard C support.

In this publication, C or C++ refers to standard high-level language support. The term TARGET(TPF) is used to highlight significant differences or limitations between TARGET(TPF) and standard C support.

With the C or C++ language and compilers, you can create dynamic link libraries (DLLs) and DLL applications. See "C++ Support" and "Dynamic Link Library (DLL) Support" for more information about C++ and DLLs.

ISO-C and TARGET(TPF) functions can call each other; however, they operate in separate environments. This fact can have subtle effects where the global C environment is shared among C functions. For example, calling setlocale to change the current locale in a TARGET(TPF) function will have no effect on the locale for any ISO-C functions that may be called, and vice versa.

Note:
TARGET(TPF) functions cannot call DLLs.