Re: How to declare a constant variable? [message #56264] |
Tue, 09 October 2007 03:09 |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Oct 9, 4:30 pm, David Fanning <n...@dfanning.com> wrote:
> A=5 is about the best you can do with a dynamically typed
> language. ;-)
I disagree. A=42 is much better.
-k.
|
|
|
Re: How to declare a constant variable? [message #56268 is a reply to message #56264] |
Mon, 08 October 2007 20:30  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mystea writes:
> I would like to define some variables that I expect as a constant. I
> realize that I can declare it as a system variable as follows:
>
> defsysv, !var1=(some value), 1
>
> However, this inevitably make my variable accessible to the whole
> program. What should I do if I need a constant, local scope variable?
A=5 is about the best you can do with a dynamically typed
language. ;-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|