From: Leif Leonhardy Newsgroups: comp.os.msdos.djgpp Subject: Re: In getopt.c wht is place declared as const Date: Sat, 08 Sep 2001 09:07:22 +0200 Organization: delta t Computerservice Lines: 41 Message-ID: <3B99C3AA.91506798@dtcs.de> References: <3B99AB68 DOT 19D91FCB AT dtcs DOT de> NNTP-Posting-Host: pd9e0e1c2.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.online.de 999932768 25977 217.224.225.194 (8 Sep 2001 07:06:08 GMT) X-Complaints-To: abuse AT online DOT de NNTP-Posting-Date: 8 Sep 2001 07:06:08 GMT X-Mailer: Mozilla 4.01 [de] (Win95; I) X-Priority: 3 (Normal) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > > 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