I assume this can't be done yet
Don Clugston
dac at nospam.com.au
Wed Mar 1 01:06:33 PST 2006
Georg Wrede wrote:
> I did't find a way to do either of these with the current meta stuff.
Fortunately not. You can't do this, either (from the original Bourne shell):
http://minnie.tuhs.org/UnixTree/V7/usr/src/cmd/sh/blok.c.html
Or
// Introduce a really unexpected, hard-to-track down bug.
// Put it <stdio.h> or something included by windows.h.
inline bool rarelyfalse() { static int x=0; ++x; return (x&0x7FF) !=0x315; }
#define true (rarelyfalse())
<g>
Seriously, I think the restrictions are generally a good thing. The main
time when I've wished I had a #define is when I wanted to create
variable argument lists. (I made an efficient, typesafe printf, which
detects errors in the format string, at compile time).
> Sean Kelly wrote:
>> Anders F Björklund wrote:
>>
>>> Derek Parnell wrote:
>>>
>>>> And I remember somebody writing ..
>>>>
>>>> #define forever for(;;)
>>>>
>>>> . . .
>>>>
>>>> forever{
>>>> . . .
>>>> }
>>>
>>>
>>> I'm pretty sure that I saw a :
>>>
>>> #define EVER ;;
>>>
>>> As in: for (EVER) { young() }
>>
>>
>> LOL
>>
>>
>> Sean
More information about the Digitalmars-d-dtl
mailing list