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 #31233] Thu, 27 June 2002 15:51 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
I believe that the @ statement also works in PVWave. However, you have to be
careful with @. You can't have any leading spaces, or spaces between it and
the filename. So, you should change "@ junk" to "@junk", and make sure that
the @ is all the way over to the left.

William Thompson


jeyadev@wrc.xerox.bounceback.com (Surendar Jeyadev) writes:

> 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: Fri Oct 10 05:43:21 PDT 2025

Total time taken to generate the page: 0.32463 seconds