comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to declare a constant variable?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to declare a constant variable? [message #56264] Tue, 09 October 2007 03:09
mankoff is currently offline  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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to locate a "NaN"?
Next Topic: Make money to share your videos

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:51:28 PDT 2025

Total time taken to generate the page: 0.48049 seconds