Mail Archives: djgpp/2004/02/04/08:44:20
>> > #define MA(i,j,k) A[i][j][k]
>> >
>> >(note the use of parentheses instead of square brackets), or a similar
>> >definition of an inline function.
>>
>> very good !
>
>Actually, not very good because using macros to change a syntactic
>appearance of a programming language is generally a bad habit. For
>starters, people who read your program will have difficulty
>understanding the code. And you yourself prevent yourself from
>learning C faster.
I assume that the compiler first translates the #define 's
into another source code file S and then processes
S in a second step.
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 ?
- Raw text -