Lugaru's Epsilon Programmer's Editor 14.04
Context:
|
Epsilon User's Manual and Reference > Epsilon Extension Language > Data Types > Complex DeclaratorsAs some of the examples thus far have shown, you can compose (combine) declarators to yield arbitrarily complicated types, like function returning pointer to an array of 10 chars:
When composing declarators, function and array declarators have the same precedence. They each take precedence over pointer declarators. So the example we used in Function Declarators:
could have been written more simply as
The rule that EEL follows for declarations is that the identifier involved is to be declared so that an expression with the form of the declarator has the type of the type specifier. This implies that the grouping of operators in a declarator follows the same rules as the operators do in an expression. There are a few restrictions on the combinations of declarators when functions are involved (and so on the combinations of types). Functions may not return arrays, structures, unions, or functions, but they may return pointers to any of these. Similarly, functions may not be members of structures, unions, or arrays, but pointers to functions may be.
|