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

Home » Public Forums » archive » Beginer question about the @ usage
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Beginer question about the @ usage [message #44850] Wed, 27 July 2005 10:32 Go to previous message
Mathieu Malaterre is currently offline  Mathieu Malaterre
Messages: 32
Registered: July 2005
Member
Hello,

So I am slowly learning idl, and I am confused on the use of the '@' to
include files.

If I have:
::::::::::::::
hello.pro
::::::::::::::
print, 'Hello World'
exit


I can just run
$ idl hello.pro
and everything is fine

If I have then:
::::::::::::::
lib.pro
::::::::::::::
; Lib containing one Function

; carre return the square of its input
Function carre, input
return, input*input
End
::::::::::::::
testlib.pro
::::::::::::::
; include the content of file: lib.pro
@lib
a = 5
print, a
b = carre(a)
print, b
exit



I cannot run :
$ idl testlib.pro

it returns:
% Programs can't be compiled from single statement mode.

Then I tried:
$ echo testlib | idl
but then it returns:
% Attempt to call undefined procedure/function: 'TESTLIB'.
% Execution halted at: $MAIN$


What is the correct way to run testlib.pro ?

Thanks
Mathieu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Multithreading in IDL
Next Topic: Re: () and execution speed

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

Current Time: Sat Oct 11 00:57:50 PDT 2025

Total time taken to generate the page: 0.88014 seconds