Const usage in ansii C.

Steven W Orr steveo at world.std.com
Sat Nov 17 05:46:00 AEST 1990


Hi all: I dont consider my self a novice, but...

I have not been able to find a description of how to write const
declarations. The K+R IInd ed does not explain it except in its most
simple form. The type of answer I'm looking for is like this:

There are three operators that can be used in a C declaration
 () function returning ...
 [] array of ...
 and
 * pointer to something. 

 () and [] are equal precedence and evaluate from left to right.
 * is lower and evals from right to left. 

Where do const keywords fit into this scheme? All I want to do is be
able to say something outrageous like
X is a constant pointer to a function that returns a constant
pointer to a constant array of constant ints. 

Thanks in advance. Please email me and if there's enough interest I
will summarize.
-- 
----------Time flies like the wind. Fruit flies like bananas.------------------
Steven W. Orr      steveo at world.std.com     uunet!world!steveo
-------------------------------------------------------------------------------



More information about the Comp.lang.c mailing list