Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Description of the C functions

&pagelevel(5)&pagelevel

The C functions are listed in alphabetical order in the overview and described in detail in the pages that follow ("Overview of C functions"). Those functions that support optional parameters and have therefore been split into several functions are described under a single function name. For example, the functions sdfrd, sdfrdmsg, sdfrdall, sdfrdpre and sdfrddef are all described in the section entitled ’sdfrd’ and labelled formats 1 to 5.

Results of functions

Every C function returns an integer as its result:

Result = 0:

Normal execution; no errors

Result > 0:

Error in the associated macro. The error code has been copied from
register 15. The value of the error code corresponds to that of the
macro error code.

Result < 0:

Error in the function call. The value is one of the following:

-1 :

Function unknown

-2 :

Not enough operands

-3 :

Last operand in structure reached

-4 :

Last operand in list reached

-5 :

Position is negative

-6 :

Operand is not of the type LIST

-7 :

Operand is not of the type STRUCTURE

Notes

In order to call a C function for SDF, the program requires the following include elements from the SYSLIB.SDF.04x library:

sdfc.h

sdfcext.h

(contains constant and type definitions)

(contains the external declarations of the functions)

Note that certain strings must be aligned on a halfword or word boundary. However, since variables of the data type ’char’ may be aligned only on the byte boundary, they must also be aligned with the aid of the malloc() function.

The variables for internal statement names must be 8 characters long and must end with “\0”. The predefined type STR8 from the include element sdfc.h can be used for this purpose.

An example of how to use the C functions begins on "Example of the use of the C functions".