[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rstrpos: version 5.2 and version 5.3
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:
> FORWARD_FUNCTION STRPOS, RSTRPOS
>
> > IF Float(!Version.Release) GT 5.2 THEN BEGIN
> > dot = StrPos(line, ".", /Reverse_Search)
> > ENDIF ELSE BEGIN
> > dot = RStrPos(line, ".")
> > ENDELSE
> >
> > Although that *seemed* like a good idea at the time,
> > I found that the line won't compile in versions of
> > IDL older than IDL 5.3. :-(
>
> The above FORWARD_FUNCTION declaration should solve your problems, no?
I don't think so, because the problem is the keyword. But
using JD's Call_Function gets around this with the compiler
because the program isn't compiled (which is when the number
of keywords is "attached" to the program module) until run-time.
And, anyway, I consider the use of FORWARD_FUNCTION to
be an admission of a program structure that is out of
control. Nothing against it, you just wouldn't find it
in any of my programs. :-)
Cheers,
David
P.S. I don't think I have the energy for another long
thread. Let's just write it off as one of my personal
quirks. :-)
--
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