m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU M4 capabilities...


From: Steven Simpson
Subject: Re: GNU M4 capabilities...
Date: Tue, 14 Mar 2006 15:30:29 +0000
User-agent: Thunderbird 1.5 (X11/20051025)

Hello!

Jakob Viketoft wrote:
> Do M4 support conditional blocks, like #ifdef, #else #endif etc? This
> seems to me as the minimum level of support wanted from any
> preprocessor, but what I understand of the M4 manual, this can only be
> done on a line level (ifdef(...)).
m4 macro calls are not limited to a single line.  For example:

ifdef(`mymacro',

``The macro happens
to be defined.'',

``Disasterously, the macro in
question is not defined.'')

Even the name of the tested macro could consist of multiple lines
(though you wouldn't be able to invoke such a macro directly).

Note that unquoted whitespace at the start of an argument is ignored. 
In the example given, it's only the newlines that break the two
sentences that are really demonstrating multi-line operation.

Regards,

Steven

-- 
ss at comp dot lancs dot ac dot uk                                     |





reply via email to

[Prev in Thread] Current Thread [Next in Thread]