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

Home » Public Forums » archive » functions considered as variables
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: functions considered as variables [message #11212 is a reply to message #11056] Fri, 06 March 1998 00:00 Go to previous message
Selwyn Yee is currently offline  Selwyn Yee
Messages: 1
Registered: March 1998
Junior Member
I've seen this before. It happens when, in your .pro file, you are
trying to call a function which has not yet been compiled. Either the
function is in a
different module, or is in the same .pro file, but below your calling
statement.

Because IDL is an interpretive language, it executes and/or compiles the
code in your .pro file from top to bottom. Your function call:

junk = getlatlon(alt_gps)

looks just like you are subscripting an array, if IDL hasn't yet
compiled your
function getlatlon.

The solution is to use the forward_function command in IDL. The syntax
is:

forward_function function1, function2, ...

So for you, you would precede your function call with:

forward_function getlatlon

Hope this does the trick for you.


--
Selwyn M.T. Yee Phone: (650) 604-2861
Airborne Sensor Facility Fax: (650) 604-4987
NASA Ames Research Center Email: syee@mail.arc.nasa.gov




gbust@arlut.utexas.edu wrote:
>
> This might be related to my previous post - I don't know. Anyway, I am
> buzzing away, my driver code calling other routines just fine. I have
> compliled a .pro file that has a bunch of routines in it, and all of a sudden,
> I am stopped in my driver routine at:
> junk = getlatlon(alt_gps)
> with the error notice: variable getlatlon not found.
>
> So I do a help, and sure enough it says getlatlon is a function. So, before
> returning to main, i.e. right where the code stopped, I just type the above
> from the command line - and it works fine. What gives?
>
> Thanks a lot in advance.
>
> -Gary
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Memory Mapped files For IDL (UNIX)
Next Topic: Re: IDL 5.0 widget bug?

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

Current Time: Fri Oct 10 16:49:48 PDT 2025

Total time taken to generate the page: 0.34772 seconds