Mike Parker <aldac...@gmail.com> writes: > On 7/3/2012 12:12 PM, Wouter Verhelst wrote: >> >> So, I wanted to create a number of functions that would call write(), >> writef(), writefln(), or writeln() with whatever arguments they were >> given, but only if the user had used a 'enable debugging' command-line >> option (or some such). >> >> What I first did was this: >> >> module debugout; >> >> int debuglevel; > > > Are you aware of debug conditions? > > http://dlang.org/version.html#debug > > They can be set on the command line or in code at module level. In the > former case, it's global. In the latter, only module scope.
Yes, but these are defined at compile time, if I understand things correctly. That's useful, but not what I'm after; the idea would be that a user of my application could use a '-v' option on the command line to get more output. -- The volume of a pizza of thickness a and radius z can be described by the following formula: pi zz a