ILE C/C++ Programmer's Guide

Differences in Function Definitions

C++ language onlyThis code shows how extern "OS" with a function definition is used to replace the #pragma linkage directive. See Chapter 23, Using ILE C/C++ Call Conventions for additional information.


Do not use this: Use this:
#pragma datamodel (p128)
typedef void (FUNC)(int);
#pragma linkage (FUNC, OS)
#pragma datamodel(pop)
extern "OS" typedef void (FUNC) (int);
typedef void (FUNC)(int)
extern "OS" FUNC;          //error


[ Top of Page | Previous Page | Next Page | Table of Contents ]