This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

'near' and 'far'

Hi,

I read the following from spru187t.pdf on near and far key word. I guess that 'near' and 'far' cannot put together, but the italic line below it seems that it is on the contrary. Or my comprehension has problems. Could you explain it to me? Thanks.

 

.................

Syntactically, the near and far keywords are treated as storage class modifiers. They can appear before, after, or in between the storage class specifiers and types. With the exception of near and far, two storage class modifiers cannot be used together in a single declaration. The following examples are legal combinations of near and far with other storage class modifiers:

far static int x;

static near int x;

static int far x;

far int foo();

static far int foo();

  • No, using both "near" and "far" in the same declarator would be a self-contradiction.

    What "with the exception of near and far ..." means is that there can be two storage class modifiers only if one of them is either "near" or "far".