in reply to Re: Behavior of compile-time constants?
in thread Behavior of compile-time constants?
Don't use the constant pragmawhat? personally, i dislike use constant, so i don't use it. but there is no reason not to use it in this case. as Abagail-II stated above, fix the context and the problem is gone.
here's an example (my formatting)
since i mentioned my dislike of the constant module (pragma?), i'll describe my solution:use constant ROTATE => 1; use constant HOLD => 2; use constant FLASH => 3; use constant NUM_MODES => 3; # etc. my %modestring = ( +ROTATE => "a", +HOLD => "b", +FLASH => "c", # etc... );
sub ROTATE () { 1 } # etc. my %modestring = ( +ROTATE => a, # etc. );
~Particle *accelerates*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Behavior of compile-time constants?
by Abigail-II (Bishop) on Jun 14, 2002 at 18:13 UTC | |
by particle (Vicar) on Jun 14, 2002 at 18:33 UTC | |
by chromatic (Archbishop) on Jun 14, 2002 at 19:59 UTC | |
|
Re: Re: Re: Behavior of compile-time constants?
by perrin (Chancellor) on Jun 14, 2002 at 18:15 UTC | |
by Abigail-II (Bishop) on Jun 14, 2002 at 18:19 UTC | |
by perrin (Chancellor) on Jun 14, 2002 at 18:24 UTC | |
by Abigail-II (Bishop) on Jun 14, 2002 at 18:29 UTC |