D - debug and version
- larry cowan (17/17) Jan 31 2004 The manual explanations for debug and version are not clear to me. SAMP...
- J C Calvarese (30/50) Jan 31 2004 Many of the explanations in the specification are vague. It's part of
- larry cowan (10/60) Jan 31 2004 Got my compiler working now. As you indicated, 5,6,7,9,11, and 12 won't
The manual explanations for debug and version are not clear to me. SAMPLES does not show any debug statements and only 1 version statement. Given: dmd.exe -debug-5 -debug=RED -debug="GREEN" myprog.d Which of the following are valid statements and should compile their code into myprog (and why)? 1. debug {...} 2. debug (4) {...} 3. debug (5) {...} 4. debug (6) {...} 5. debug ("4") {...} 6. debug ("5") {...} 7. debug ("6") {...} 8. debug (RED) {...} 9. debug ("RED") {...} 10. debug (GREEN) {...} 11. debug ("GREEN") {...} 12. debug (RED && GREEN) {...}
Jan 31 2004
larry cowan wrote:The manual explanations for debug and version are not clear to me. SAMPLES does not show any debug statements and only 1 version statement.Many of the explanations in the specification are vague. It's part of being a pre-1.0 language.Given: dmd.exe -debug-5 -debug=RED -debug="GREEN" myprog.dI think you need to leave out the quote marks ("). I haven't done any of these specific experiments, but I think debug/version names follow identifier rules, i.e. ... OK: RED, GREEN, GREEN_COLOR, Green_Color, Whatever Numbers are also supposed to be allowed as identifier, but I've never tried that. I have very little with debug, but I've use version a lot more often. Here's some examples that I've worked up... http://jcc_7.tripod.com/d/tutor/locales1.html http://jcc_7.tripod.com/d/tutor/locales2.htmlWhich of the following are valid statements and should compile their code into myprog (and why)?I think I know these answers...1. debug {...}valid2. debug (4) {...}valid3. debug (5) {...}valid4. debug (6) {...}valid5. debug ("4") {...}not valid6. debug ("5") {...}not valid7. debug ("6") {...}not valid8. debug (RED) {...}valid9. debug ("RED") {...}not valid10. debug (GREEN) {...}valid11. debug ("GREEN") {...}not valid12. debug (RED && GREEN) {...}not valid -- Justin http://jcc_7.tripod.com/d/
Jan 31 2004
Got my compiler working now. As you indicated, 5,6,7,9,11, and 12 won't compile. When executed, 1, 8, and 10 appear to have compiled in, (the command line appears to have accepted both -debug=RED and -debug="GREEN"). Correcting my command line to use -debug=5 instead of -debug-5 adds in statements 2 and 3. Apparently any form of -debug... seems to compile statement 1. Multiple -debug options are all accepted and used correctly, with multiple numerics accepted as either 5 or "5" format and only the last one used by the compiler. I presume this is as it should be. Thanks. -larry In article <bvh1uu$2fb1$1 digitaldaemon.com>, J C Calvarese says...larry cowan wrote:The manual explanations for debug and version are not clear to me. SAMPLES does not show any debug statements and only 1 version statement.Many of the explanations in the specification are vague. It's part of being a pre-1.0 language.Given: dmd.exe -debug-5 -debug=RED -debug="GREEN" myprog.dI think you need to leave out the quote marks ("). I haven't done any of these specific experiments, but I think debug/version names follow identifier rules, i.e. ... OK: RED, GREEN, GREEN_COLOR, Green_Color, Whatever Numbers are also supposed to be allowed as identifier, but I've never tried that. I have very little with debug, but I've use version a lot more often. Here's some examples that I've worked up... http://jcc_7.tripod.com/d/tutor/locales1.html http://jcc_7.tripod.com/d/tutor/locales2.htmlWhich of the following are valid statements and should compile their code into myprog (and why)?I think I know these answers...1. debug {...}valid2. debug (4) {...}valid3. debug (5) {...}valid4. debug (6) {...}valid5. debug ("4") {...}not valid6. debug ("5") {...}not valid7. debug ("6") {...}not valid8. debug (RED) {...}valid9. debug ("RED") {...}not valid10. debug (GREEN) {...}valid11. debug ("GREEN") {...}not valid12. debug (RED && GREEN) {...}not valid -- Justin http://jcc_7.tripod.com/d/
Jan 31 2004