Lugaru's Epsilon
Programmer's
Editor 14.04

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

Previous   Up    Next
Simple Declarators  Epsilon Extension Language   Array Declarators


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

Pointer Declarators

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

* declarator

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 in D to be of type "... pointer to T". Several examples illustrate the concept.

int l;
int *lptr;
int **ldblptr;

Clearly, the first declaration declares l to be of type int. The type specifier is int and the declarator is l.

The second line is a little more complicated. The type specifier is still int, but the declarator is *lptr. Using the rule above, we see that lptr is a pointer to an int. This is immediately clear from the above if you substitute "int" for T, and "lptr" for D.

Similarly, the third line declares ldblptr to be a pointer to a pointer to an int.



Previous   Up    Next
Simple Declarators  Epsilon Extension Language   Array Declarators


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