.-P128--. >>-#--pragma--datamodel--(--+-LLP64-+--)----------------------->< '-pop---'
Description
Specifies a data model to apply to a section of code. The data model setting determines the interpretation of pointer types in absence of an explicit modifier.
This pragma overrides the data model specified by the DTAMDL compiler command line option.
Parameters
Note on Usage
This pragma and its settings are case-sensitive when used in C++
programs.
Specifying #pragma datamodel(LLP64) or #pragma datamodel(llp64) has effect only when the TERASPACE(*YES) compiler option is also specified.
The data model specified by this pragma remains in effect until another data model is specified, or until #pragma datamodel(pop) is specified.
Example
This pragma is recommended for wrapping header files, without having to add pointer modifiers to pointer declarations. For example:
// header file blah.h #pragma datamodel(P128) // Pointers are now 16-byte char* Blah(int, char *); #pragma datamodel(pop) // Restore previous setting of datamodel
You can also specify data models using the __ptr64 and __ptr128 pointer modifiers. These modifers override the DTAMDL compiler option, and the #pragma datamodel setting for a specific pointer declaration.
The __ptr64 modifier should only be used if the TERASPACE(*YES) compiler option is also specified. The __ptr128 modifier can be used at any time.
The following example shows the declarations of a process local pointer and a tagged space pointer:
char * __ptr64 p; // an 8-byte, process local pointer char * __ptr128 t; // a 16-byte, tagged space pointer
For more information, see Using Teraspace in WebSphere Development Studio: ILE C/C++ Programmer's Guide, and Teraspace and single-level store in ILE Concepts.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.