Mail Archives: djgpp/2001/09/08/03:30:16
>
> > there is a variable called "place" that is declared as
> >
> > "static const char *place"
>
> If you want to learn about the meaning of sometimes mystic declarations,
> pick the program 'cdecl' (which is fairly old, but I think there is a
> version on some djgpp mirror site?); it takes a declaration in C syntax
> and explains it in natural language. There should be a C++ version,
> also.
>
> return (volatile void(*)(const int[],char*[],double(*)()))bye;
>
leif AT cybermaus:/gcc/go32/v2> cdecl
Type `help' or `?' for help
cdecl> explain static const char *place
parse error
cdecl> explain const char *place
declare place as pointer to const char
cdecl> explain char* const place
declare place as const pointer to char
cdecl> explain static char* const place
declare place as static const pointer to char
cdecl> explain static char const *place
parse error
cdecl> explain (volatile void(*)(const int[],char*[],double(*)()))bye
cast bye into pointer to function (array of const int, array of pointer
to char,
pointer to function returning double) returning volatile void
cdecl> quit
leif AT cybermaus:/gcc/go32/v2>
As you can see, 'cdecl' is a bit limited as it cannot know if the
declaration is in
a function (or code block) or outside, in a file.
'cdecl' is located in the v2apps/ directory, currently cdecl25b.zip
(binaries),
and cdecl25s.zip (source).
Leif
- Raw text -