ILE C/C++ Programmer's Guide

Operational Descriptors and the #pragma descriptor Directive

ILE C/C++ provides a #pragma descriptor directive to identify functions whose arguments have operational descriptors. You can retrieve the information from an operational descriptor using the ILE bindable APIs Retrieve Operational Descriptor Information (CEEDOD) and Get Descriptive Information About a String Argument (CEESGI). The ILE C/C++ supports operational descriptors for string arguments.

Note:
The term static procedure call does not refer to static storage class but refers to a bound procedure call within a bound module or service program. Operational descriptors can be used to resolve the differences in the representation of character strings, if:

Example: Declaring a Function that Requires Use of Operational Descriptors

The following figure shows how to declare a function that requires operational descriptors for some of its arguments.

Figure 251. ILE C Source that Declares a Function that Requires Operational Descriptors




int func (char *, int *, int, char *, ...); /* prototype */
#pragma descriptor (void func ("", void, void, ""))

A function that is named func() is declared. The #pragma descriptor for func() specifies that the ILE C compiler must generate string operational descriptors for the first and fourth arguments of func() whenever func() is called.

Example: Generating Operational Descriptors

The following figure shows that the #pragma descriptor for func1 with a #pragma descriptor directive for the function in a header file oper_desc.h.

Figure 252. ILE C Source to Generate Operational Descriptors




/* Function prototype in oper_desc.h */
int func1( char a[5], char b[5], char *c );
#pragma descriptor(void func1( "", "", "" ))

A function that is named func1() is declared. The #pragma descriptor for func1() specifies that the ILE C compiler must generate string operational descriptors for the three arguments.


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