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

Home » Public Forums » archive » Including files/eps into PS
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: Including files [message #15508 is a reply to message #11442] Tue, 25 May 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Martin Schultz wrote:
> Of course ;-) I can also offer you a solution which is to include a
> default definition in your include file as well, such as:
> ----------------------------------------------------
> ; myinclude.pro === note, this is not a procedure
> common bla,var1,var2,svar
>
> if (n_elements(var1) eq 0) then begin
> var1 = fltarr(100)
> var2 = 100L
> svar = ''
> endif
> ----------------------------------------------------
> I really like participating in this newsgroup to get me started in the
> morning!

So do I, but I always make sure I've had my coffee first :-)

The script above generates a syntax error at the ENDIF line when
included with

@myinclude.pro

because block termination statements (ENDFOR, ENDIF, ENDREP, ENDWHILE)
are only allowed in procedures or functions. So you'll need to fake it
as follows:

common bla,var1,var2,svar
if n_elements(var1) eq 0 then $
var1=fltarr(100) &
var2=100L &
svar=''

Cheers,
Liam.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: When you can't concatenate structures like you expect....
Next Topic: Re: Hex constants interpreted differently in IDL/v5.2

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

Current Time: Fri Oct 10 16:29:46 PDT 2025

Total time taken to generate the page: 0.72218 seconds