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

Home » Public Forums » archive » Re: Defining constants in IDL?
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: Defining constants in IDL? [message #31263 is a reply to message #31233] Tue, 25 June 2002 10:37 Go to previous messageGo to previous message
jeyadev is currently offline  jeyadev
Messages: 78
Registered: February 1995
Member
In article <B93A247B.5660%ronn@rlkling.com>,
ronn kling <ronn@rlkling.com> wrote:
>
> Hi Marshall,
>
> Actually there is something similiar to including a header file. What you
> need is a file with no header (i.e. pro or function as the first line) and
> no end statement. For example,
>
> a = 0
> True = 1
> False = 0
> yes = 'YES'
>
> could be saved in a file called constants.pro.
>
> To include this in your own code you would do this.
>
> pro myProcedure, p1, p2
>
> @constants
>
> ...
> ...
>
> end
>
> The @ sign acts as an include statement to the compiler.

Alas, it fails with PV-Wave. Does anyone have a workaround?

kaveri 193% cat junk.pro
a = 1.0
b = 2.0
c = 3.0

kaveri 194% cat try.pro

pro try, x

@ junk
print, x + a
print, x + b
print, x + c

end

.....
.....

WAVE> .run try
% Input line is too long for input buffer of 511 characters.
% Compiled module: TRY.
WAVE>

Not good, eh? Thought it was my file try.pro that was the problem.
Turns out that it is not. Commenting the line out makes the file
'compile'.

I must say that the lack of this facility in very irksome. It is
one of the great adavantages of Python, which, though similar to
IDL/Wave has distinct advantages with namespaces, etc. There are
many times that I would like to call a Wave "main" programme
from another (just as I would Unix scripts) and not being able
means doing some of the work with Python, etc.



--

Surendar Jeyadev jeyadev@wrc.xerox.bounceback.com

Remove 'bounceback' for email address
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Delvar?
Next Topic: Re: write_jpeg and TVRD()

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

Current Time: Sun Oct 12 09:24:42 PDT 2025

Total time taken to generate the page: 1.76085 seconds