Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Epsilon Extension Language
      . . .
      Scope of Variables
      Data Types
         . . .
         Pointer Declarators
         Array Declarators
         Function Declarators
         Structures and Unions
         Complex Declarators
         . . .
      Initialization
      . . .

Previous   Up    Next
Array Declarators  Epsilon Extension Language   Structures and Unions


Epsilon User's Manual and Reference > Epsilon Extension Language > Data Types >

Function Declarators

Function declarators are used in conjunction with type specifiers to declare variables of type function returning t, where t is some type. The form of a function declarator is

declarator ()

or

declarator ( ansi-argument-list )

Again, suppose T is a type specifier and D is a declarator, and the declaration "T D;" declares the identifier embedded in D to be of type "... T". Then the declaration T (D)(); declares the identifier to be of type "... function returning T".

Consider:

char (c)();
char *(fpc());
char (*pfc)(int count, char *msg);

The first line declares c to be of type function returning char. The second line declares fpc to be a function returning pointer to char. The third line declares pfc to be of type pointer to function returning char. The third example also declares that pfc requires two parameters and gives their types; the first two examples provide no information about their functions' parameters.



Previous   Up    Next
Array Declarators  Epsilon Extension Language   Structures and Unions


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.