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

Home » Public Forums » archive » Re: What is the main difference between a script and a procedure?
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: What is the main difference between a script and a procedure? [message #56180 is a reply to message #56105] Thu, 04 October 2007 15:45 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 03 Oct 2007 07:40:49 -0600, David Fanning wrote:

> mystea writes:
>
>> As far as I can tell, a script:
>> 1. Can't accept any arguments and can't take any extended loops.
>> 2. It can recognize any variable that exists in the current session
>> because it behaves just like a a list of commands in sequence.
>>
>> On the other hand, a procedure:
>> 1. Can accept arguments, but can't recognize any variables which exist
>> in current IDL session.
>
> What you are calling a "script", most people call a
> "batch file". This is a way to execute a series of
> commands "as if" you were typing them at the IDL
> command line. Since this is just about the most limited
> way of using IDL, batch files are typically used infrequently.

I use batch files as IDL equivalents of #include statements, to include
frequently needed code, e.g. common block definitions, ala:

pro mypro,a,b,c
@my_common
my_common_var=2
end

So they aren't entirely useless.

JD
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL Help with Reading EOS-HDF Files
Next Topic: Is there a way to undo a plot?

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

Current Time: Sat Oct 11 11:22:49 PDT 2025

Total time taken to generate the page: 0.71926 seconds