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

Home » Public Forums » archive » Re: .compile vs .run
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: .compile vs .run [message #43499] Mon, 18 April 2005 11:30 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"m_schellens" <mschellens@gmail.com> wrote in message
news:1113803159.824679.58050@l41g2000cwc.googlegroups.com...
> I have the following file 't.pro':
>
> pro t1
> print,'t1'
> end


Hi Marc,
others have answered your question. I'd just mention that you can
add a "main program" at the end of your procedure as follows:

pro t1
print,'t1'
end ; end of procedure
; main level code here
t1, 17
end ; end of main level code


If that is saved as your file t1.pro, it works as a procedure, but you
can also execute the file.

IDL>.run t1
17


The utility of this is that testing you can test the code nicely, and it
serves as
an example of how to use the code. I find it quite handy.

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "?" help-command in linux
Next Topic: IDL - ENVI batch mode question

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

Current Time: Fri Oct 10 00:00:46 PDT 2025

Total time taken to generate the page: 1.03946 seconds