Re: [fpc-devel] RFC: changing conditional compilation

2010-02-13 Thread Flávio Etrusco
Hi Jonas, As you can imagine I'd prefer to solve the $ifdef problem ;-) To be honest: no, I can't imagine why you would prefer that. The entire difference between $ifdef and $if is that $if checks the value of something (and hence will give an error if the symbol is undefined) and $ifdef

Re: [fpc-devel] RFC: changing conditional compilation

2010-02-09 Thread Jonas Maebe
On 09 Feb 2010, at 01:24, Flávio Etrusco wrote: As far as I know, that's how macros behave. E.g.: {$macro on} {$define xxx:=1} {$if xxx} begin end. {$endif} If you undefine xxx, you'll get a compile time error. Downside: they don't work with booleans for some reason, only with

Re: [fpc-devel] RFC: changing conditional compilation

2010-02-09 Thread Flávio Etrusco
2010/2/9 Jonas Maebe jonas.ma...@elis.ugent.be: On 09 Feb 2010, at 01:24, Flávio Etrusco wrote: As far as I know, that's how macros behave. E.g.: {$macro on} {$define xxx:=1} {$if xxx} begin end. {$endif} If you undefine xxx, you'll get a compile time error. Downside: they don't

Re: [fpc-devel] RFC: changing conditional compilation

2010-02-08 Thread Jonas Maebe
On 09 Feb 2010, at 00:01, Flávio Etrusco wrote: Now there's Macros, but they wouldn't solve the problem either, unless you'd use some crazy scheme with $if declared or something AFAICS. What I wished is to change (or add a directive to change) the way $ifdef/ifndef work, enforcing that