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

Home » Public Forums » archive » Re: arrays vs. functions conflicts
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: arrays vs. functions conflicts [message #38380 is a reply to message #38378] Fri, 05 March 2004 07:44 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paolo Grigis writes:

> But sometimes it happens that I run *another* program before,
> which compile a function called limits. If then I compile the
> procedure, the compiler thinks limits is a function and all
> hell break loose.

Ah, yes, well. This is a problem not so much
with square brackets (which obviously help eliminate
this problem), but with the fact that IDL is perfectly
happy with arrays and functions (and procedures, for
that matter) having the same name.

Once a name is put into IDL's memory space as an array,
it is going to be impossible to get the same name registered
in its memory space as a function unless you explicitly
compile the function. (Exiting IDL is not necessary.)

Then, of course, since it is listed in IDL as both a
variable AND a function, you are going to have trouble
telling one from the other without using square brackets.

We have been trying to solve the second problem first. :-)

The first problem can be solved by using a FORWARD_FUNCTION
statement. And, if you are lucky, unlike some people we know,
that might also solve your second problem.

And, of course, you can also write a polite e-mail to the
people supplying your code (Craig!!) to please get with the
21st century and put square brackets on their arrays. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[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
Previous Topic: Widgets in VM
Next Topic: How to get info about ROI from iTools IIMage?

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

Current Time: Wed Oct 08 20:08:13 PDT 2025

Total time taken to generate the page: 1.09056 seconds