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

Home » Public Forums » archive » Re: Linking multiple files...
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: Linking multiple files... [message #31512 is a reply to message #31505] Mon, 22 July 2002 19:35 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
squad@hotmail.com (Bob) writes:

> Hey everyone... maybe I'm just really dumb, but for some reason I
> can't get IDL to properly link several files together. What I mean by
> link is the following:
>
> --- In one file, I have a function called "FINDROOTS" which finds the
> roots of a quadratic equation (Function FindRoots, a, b, c).
>
> --- In one file I have a procedure "PRINT_TO_FILE", which calls
> FindRoots with a very short list of different a's and b's and c's, and
> then outputs it to a text file.

David's solution is the correct one. The quick and dirty solution is
to put:
forward_function findroots

within PRINT_TO_FILE, before the first reference to FINDROOTS() is
made.

The problem is that IDL doesn't know whether you are referring to an
function or an array, since both are accessed using the () notation.
Since you didn't keep FINDROOTS in its own self-named file, IDL won't
know about it and assume that references to FINDROOTS are array
references. The above hint helps IDL decide.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: idl file conversion
Next Topic: Re: idl file conversion

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

Current Time: Sun Oct 12 04:42:38 PDT 2025

Total time taken to generate the page: 0.96049 seconds