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

Home » Public Forums » archive » Re: Function compiles, but get message as if it's not
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: Function compiles, but get message as if it's not [message #41096 is a reply to message #41095] Tue, 21 September 2004 16:58 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
If you do ".compile taco", IDL will search for a file "taco.pro" in your
path and compile it, recognizing all procedures and functions in the file.

If you do "taco, parameters, /keywords", IDL will search for a file
"taco.pro" in your path and compile everything until it finds a
PROCEDURE taco. Anything following that won't be compiled. A FUNCTION
taco won't be recognized.

If you do "result = taco(...)", IDL will search for a file "taco.pro" in
your path and compile everything until if finds a FUNCTION taco.
Anything following that won't be compiled. A PROCEDURE taco won't be
recognized.

So, make sure the function / procedure which has the same name as the
file is the last one in the file. This will normally be your "main"
function / procedure. If other functions / procedures are called
(needed) exclusively by that "main" one, put them into the same file,
but above. If any function / procedure might be needed more often, put
them into their own file.

Good luck,
Benjamin


Pesto wrote:
> Hello,
> I'm having a problem with an IDL program. Within the program I have a
> function that converts a number into a string in the return value. The first
> time I compile and run the program (everything is in a single .PRO file), it
> stops with an error when the call to that function it encountered. It claims
> the function is not recognized. I stop the program, recompile, and upon
> rerunning the program, it does not stop with that error, but executes the
> function as expected. Is there some required sequence of functions and
> procedures within the program? Or is there something else I don't understand
> (I'm pretty new at IDL programming)?
> Thanks for any clues.
> Chris
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: fuzzy c-means clustering IDL code
Next Topic: open HTTP links from a widget

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

Current Time: Sun Oct 12 12:15:18 PDT 2025

Total time taken to generate the page: 0.72838 seconds