Function definitions

The elements of a function definition are as follows:

IBM extension In addition, for compatibility with C++, you can use attributes to modify the properties of functions. They are described in Function attributes.

Function definitions take the following form:

C only

Read syntax diagramSkip visual syntax diagramFunction definition syntax
 
>>-+-------------------------+--+--------------------+---------->
   '-storage_class_specifier-'  '-function_specifier-'
 
>--+-----------------------+--function_declarator--{------------>
   '-return_type_specifier-'
 
>--function body--}--------------------------------------------><
 
End of C only
C++ only

Read syntax diagramSkip visual syntax diagramFunction definition syntax
 
>>-+-------------------------+--+--------------------+---------->
   '-storage_class_specifier-'  '-function_specifier-'
 
>--return_type_specifier--function_declarator------------------->
 
>--+----------------------------+--{--+-function body-+--}-----><
   '-:--constructor-initializer-'     '-try-block-----'
 
End of C++ only


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