www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Overriding debug levels

Seeking more official confirmation of current DMD behaviour...

When you are setting debug or version levels from within source code, each
statement overrides any previous statements in the module. 

  debug = 2;  // Now set to 2.
  debug = 1;  // Now changes from 2 to 1.


However, any version or debug levels set from the command line, will only
override these statements if the command line value is greater than the
level set from within the module. If a file contains ... 

  debug = 3;

but it is compiled with -debug=5 then the debug level is set to 5. However,
if it is compiled with -debug=2 then the debug level is set to 3 (from the
source file).

Is this how it was meant to work?
-- 
Derek
Melbourne, Australia
19/05/2005 12:15:48 PM
May 18 2005