in reply to Re^3: Control Structures
in thread Control Structures
The reason it's counter-intuitive is because my() is the only statement that affects the current scope with both compile-time and run-time actions. If you use a standard if-block with {}, you create a new scope and everything acts as expected.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Control Structures
by perrin (Chancellor) on May 10, 2005 at 16:26 UTC | |
by merlyn (Sage) on May 10, 2005 at 17:07 UTC | |
by dragonchild (Archbishop) on May 10, 2005 at 17:41 UTC | |
by wazoox (Prior) on May 10, 2005 at 22:09 UTC | |
by perrin (Chancellor) on May 10, 2005 at 18:20 UTC | |
by Anonymous Monk on May 10, 2005 at 21:04 UTC |