Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!bloom-beacon!athena.mit.edu!eichin From: eichin@athena.mit.edu.UUCP Newsgroups: comp.lang.c Subject: Re: C arrays of strings Message-ID: <1843@bloom-beacon.MIT.EDU> Date: Thu, 19-Nov-87 23:51:14 EST Article-I.D.: bloom-be.1843 Posted: Thu Nov 19 23:51:14 1987 Date-Received: Sat, 21-Nov-87 17:57:51 EST References: <3157@rosevax.Rosemount.COM> <231@cfpas.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: eichin@athena.mit.edu (Mark W. Eichin) Organization: Masochists, Introverts and Technocrats Lines: 38 Keywords: C Summary: ``cdecl'' automatic C declaration parser Another useful tool for understanding C declarations is ``cdecl'' which I found in one of project Athena's unsupported software libraries; I believe it is public domain, but I didn't see any comments AT ALL explaining how it works or who wrote it. Here is the help line and a demo: >help [] means optional; {} means 1 or more; <> means defined elsewhere command: declare as cast into explain english: function [( )] returning array [] of pointer to type: [{}] {} [] name is a C identifier gibberish is a C declaration C-type is int, char, double or float modifier is short, long or unsigned sue is struct, union or enum >explain char *str[12] declare str as array 12 of pointer to char (Note that the > chars are my addition, this program does NOT prompt). Not great, but when you get to several levels of structures and pointers thereto, it can help unravel things a little. Mark Eichin Disclaimer: I read news to avoid playing larn. Maybe I should go back to playing larn.