Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: How to represent structs in text Message-ID: <1988Jul22.171422.6183@utzoo.uucp> Organization: U of Toronto Zoology References: <759@vsi.UUCP> Date: Fri, 22 Jul 88 17:14:22 GMT In article <759@vsi.UUCP> friedl@vsi.UUCP (Stephen J. Friedl) writes: > I am looking for opinions on how to represent structs in text. >The two schools of thought are (a) show the full struct declaration >and (b) show just the members... By far the best way is to show just the members, introduced by text that says something like "this struct includes at least the following members, not necessarily in this order". The point here is that you may want to add more members, or rearrange existing ones, later. This usage puts people on notice that no silly tricks are allowed. (As a useful side effect, it also makes it even more likely that they will #include the header file rather than typing the structure in themselves.) Look at the wording in X3J11 or POSIX -- they do it this way. -- Anyone who buys Wisconsin cheese is| Henry Spencer at U of Toronto Zoology a traitor to mankind. --Pournelle |uunet!mnetor!utzoo! henry @zoo.toronto.edu