Thank you for advices! Probably, I'll stick to global definitions. It seems, that {$IFOPT} doesn't help conserve space when you have to switch checks somewhat often, while greatly helps write code fragments for injection.
(A line starting with {$Q-}, then simple expression, ending with some {$IFDEF ..}...{$ENDIF} sequence seems more readable to me than a company of extra lines or beginning with {$IFOPT}/{$IFDEF}: fewer symbols for eyes to make through.) From: Vinzent Hoefler <[EMAIL PROTECTED]> > Well, if you do define CHECK_OVERFLW depending on the current compiler's > settings like this: > {$IFOPT Q+} {$DEFINE CHECK_OVRLW} {$ENDIF} > then ... > > {$Q-} e:=f+g; {$IFDEF CHECK_OVRLW} {Q+} {$ENDIF} > ... this looks like one of the easiest ways. > > Well, my practice is to use more lines, so that the instruction(s) in > question don't get hidden by all the compiler-directives surrounding > it. From: Alexey Pavluchenko <[EMAIL PROTECTED]> > {$IFOPT Q+} {$Q-} {$DEFINE Q_SWITCHED} {$ENDIF} > (* do some stuff here *) > {$IFDEF Q_SWITCHED} {$Q+} {$UNDEF Q_SWITCHED} {$ENDIF} > May not fit in one line though :) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal