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

Home » Public Forums » archive » Cant find functions in lib
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: Cant find functions in lib [message #24595 is a reply to message #24551] Fri, 06 April 2001 06:45 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
"Kenneth P. Bowman" wrote:
>
> In article <MPG.1536350bbbff2315989dce@news.frii.com>, David Fanning
> <davidf@dfanning.com> wrote:
>
>> Yes, it has to be LAST, but really only if you want it
>> to work all of the time. :-)
>
> I have never understood the reason(s) for this, and find it somewhat
> inconvenient. If I have (say) a procedure and a few related functions
> that I would logically keep in the same file, it also seems logical to
> me to put the "main" procedure (the one whose name matches the
> filename) at the beginning of the file, rather than burying it at then
> end. Why doesn't IDL simply compile everything in a file? What value
> does the user get from stopping the compilation part of the way through
> a file? (Aside from confusing newbies, of course, which has, at least,
> mild entertainment value.)

The answer, if you can call it that, is that that is the way it's done. At some point
someone had to make a decision about how to do this (probably the illustrious DS sitting
in front of a PDP-11/70 terminal....). However, I don't see any problem with this method.
It's a relatively simple way to, uh, encourage programmers to group what could be
considered as "PRIVATE" functions/procedures with the "PUBLIC" namesake
function/procedure, i.e. the last one. If there was to be a change to the way this worked
I would prefer that, while IDL would still compile everything in the file, *ONLY* the
namesake routine be available to the outside world. If you require the preceding routines
outside the namesake procedure, stick it in its own file. Not very sophisticated I'll
grant you (without introducing all manner of IDL "directives" indicating which routine is
private or public?).

I don't know how this would be done, or even if it can. If it was, I'm sure it would break
about 99% of IDL code out there.

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
paul.vandelst@noaa.gov Alexander Pope.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: why is using objects so much slower ?
Next Topic: Re: spherical gridding problem

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

Current Time: Sun Oct 12 14:47:30 PDT 2025

Total time taken to generate the page: 1.02739 seconds