[Vala] preprocessor rules
- From: pancake <pancake youterm com>
- To: Vala ML <vala-list gnome org>
- Subject: [Vala] preprocessor rules
- Date: Thu, 23 Apr 2009 12:47:45 +0200
In vala 0.7 we have some preprocessor rules '#if','#else','#endif'...But
looks that it can only work with
variables, so if i do:
code that will be compiled
works, because it handles 0 as a variable and it is not defined, so the
conditional will not match,
but if you do:
XXX: This will not be done
This is a bit confusing, because there's no #define directive, only -D
can be used which I understand
because is a way to avoid messing around multiple definitions of
variables and ugly problems can appear
if people use it in the wrong way.
I find preprocessing rules quite useful for commenting code, because
they can "comment" /* */ comments.
Are there plans to support numeric values in preprocessing conditionals?
] [Thread Prev