X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Lines: 45 X-Admin: news AT aol DOT com From: sterten AT aol DOT com (Sterten) Newsgroups: comp.os.msdos.djgpp Date: 05 Feb 2004 08:12:40 GMT References: <3405-Wed04Feb2004202510+0200-eliz AT elta DOT co DOT il> Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com Subject: Re: array indices [i][j] Message-ID: <20040205031240.25284.00000313@mb-m16.aol.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >> I assume that the compiler first translates the #define 's >> into another source code file S and then processes >> S in a second step. > >In effect, it does (in practice, the two phases run together). > >> So, can I code with macros and then make the compiler >> output the preprocessed file S also, so that everyone >> can have the source without macros, if he wants ? > >You can (see the -E sw to the compiler), but why would you like >to? didn't you critisize using macros just 2 mails ago, because readers might not understand them ? That's the way how they can get the source without macros. >My recommendation is: when in Rome behave as a Roman. that's not my motto ! I'd say: when you have to behave like a Roman there,then don't go to Rome. I mean, a method isn't superior only why most people are using it. When I use macros and also supply the translated,preprocessed -E source then it can hardly be worse than coding without macros ?! It's just an additional feature and readers can chose which version they take. >That is, when >you work in a certain programming language, use the syntactic >conventions of that programming language, even if facilities like >macros allow you to redefine almost everything. that reminds me to Don Knuth's programs. http://www-cs-faculty.stanford.edu/~knuth/programs.html He is one of the world's leading authorities for algorithms and he provides many interesting programs on his webpage, but I can't read nor compile them because he uses an own,unusual language similar to C but with some special "macros". I'd appreciate, if someone could tell me how to translate his programs to C easily. Guenter