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

Home » Public Forums » archive » Compile Problem with IDL5.2
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: Compile Problem with IDL5.2 [message #16389 is a reply to message #16331] Fri, 23 July 1999 00:00 Go to previous messageGo to previous message
joerg.mosthaf is currently offline  joerg.mosthaf
Messages: 5
Registered: July 1999
Junior Member
David Fanning <davidf@dfanning.com> wrote:
: Joerg Mosthaf (joerg.mosthaf@urz.uni-heidelberg.de) writes:

<snip>

: function, MYFUNCTION, that isn't compiled until *after* UTILITY is
: compiled. As a result, "myfunction" has been registered with IDL
: as a variable.

: The problem is easily solved (without resorting to FORWARD_FUNCTION) by
: moving the function ahead of the UTILITY procedure in the file:

: **********************************************
: FUNCTION myfunction, number
: RETURN, Randomu(seed, number)
: END

: PRO utility
: value = myfunction(5)
: END

: PRO main
: utility
: print, myfunction(3)
: END
: **********************************************

: Now, when I call it:

: IDL> main
: % Compiled module: MAIN.
: 0.383502 0.653919 0.0668422

: Cheers,

: David

: --
: David Fanning, Ph.D.
: Fanning Software Consulting
: Phone: 970-221-0438 E-Mail: davidf@dfanning.com
: Coyote's Guide to IDL Programming: http://www.dfanning.com/
: Toll-Free IDL Book Orders: 1-888-461-0155

Oh, I see. Yeah, that could be a problem, as the Program kinda 'evolved'
from some test routines which got routines and subroutines added. I just
assumed, that IDL compiles all modules in a file before executing them.
Well ok, back to some re-ordering.

Thanks alot,

Joerg Mosthaf
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: calling call_external MANY times
Next Topic: Re: How can i get SCR_XSIZE, SCR_YSIZE of WIDGET_BASE

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

Current Time: Fri Oct 10 03:11:54 PDT 2025

Total time taken to generate the page: 0.00534 seconds