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

Home » Public Forums » archive » Re: Declaring constants
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Declaring constants [message #32807] Thu, 07 November 2002 14:38 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
Nidhi Kalra wrote:
> Is there any way to declare constants in IDL as you might in C header
> files or Java classes?
>
> -Nidhi

You have a couple of options.

1) Create a function, for instance

function twopi
return,2*!dpi
end

1b) similarly you could put it in an object

2) make a system variable (and perhaps put it in our startup.pro)
DEFSYSV, '!twopi', 2*!dpi

These would come in very handy should the value of pi ever change :)

Cheers,
bob stockwell
[Message index]
 
Read Message
Read Message
Previous Topic: The Case for MiXed CaPiTaLs
Next Topic: chinese char in the menu bar

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

Current Time: Wed Oct 08 15:34:20 PDT 2025

Total time taken to generate the page: 0.00962 seconds