Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!flaps From: flaps@utcs.UUCP Newsgroups: net.lang.c Subject: Re: microsoft C considered stupid Message-ID: <1986Jun26.05:21:07.10111@utcs.uucp> Date: Thu, 26-Jun-86 05:21:07 EDT Article-I.D.: utcs.1986Jun26.05:21:07.10111 Posted: Thu Jun 26 05:21:07 1986 Date-Received: Thu, 26-Jun-86 06:02:06 EDT References: <1986Jun20.01:10:46.477@utcs.uucp> <2111@umcp-cs.UUCP> Reply-To: flaps@utcs.uucp (Alan J Rosenthal) Organization: University of Toronto Lines: 49 In article <1986Jun20.01:10:46.477@utcs.uucp> I write words which I have come to eat, namely that microsoft is to blame for adding #if defined(macro_name) to C and that this is a useless extension. Uncomfortably many people have pointed out to me that microsoft did not in fact make the addition and that it is in fact useful for compound conditions. In article <1566@brl-smoke.ARPA> gwyn@brl.ARPA calls me "ignorant" and observes that "It is not clear that Rosenthal *has* learned C" and seems not to understand my complaint about the manual section concerning struct declarations explained below. (The other flamers were polite.) He also explains that it is #if defined(macro_name) rather than (manifest_constant). I believe that the microsoft manual is in error here, but I forgot to check this earlier this evening. What I did check from the microsoft manual (Microsoft C Language Reference, copyright 1984, 1985 by Microsoft Corporation, document number 8416L-300-00), is their explanation of the struct declaration. On page 57 they offer the following two syntaxes for struct declarations: struct [tag] {member-declaration-list} declarator [, declarator...]; struct tag declarator [, declarator...]; Now neither one of these can generate the frequent declarations of the form: struct record { char data[80]; struct record *next; }; , as this is missing a non-optional "declarator". Almost needless to say, this ridiculous restriction is not actually enforced by the compiler. However, on page 59 there are five examples none of which involves a style similar to my struct record declaration above, so it would appear that the writers of the manual are unaware of this syntax or have ulterior motives for not writing it down. On page 55, enum declarations are defined in exactly the same way which I believe is equally erroneous. Furthermore, I believe that it would be a big mistake to remove #ifdef from the language, because it is still being widely used, and unlike the reserved word question (if you add reserved words to the language you restrict it, in a sense), removing #ifdef would allow no new programs (such as, for example, removing 'entry' would, because you could then call a variable 'entry'). -- Alan J Rosenthal {decvax|cbosgd|linus}!ihnp4!utcs!flaps, utzoo!utcs!flaps