[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with STRSPLIT using /EXTRACT




Merrilinn Zeppa <zeppa@u.washington.edu> writes:

> I'm using version 5.3 of IDL.
> 
> I tested a program in IDLDE using STRSPLIT with /EXTRACT. The program
> worked perfectly. I then incorporated my program in a larger IDL
> program, too large for IDLDE. From the IDL prompt, the tested program
> failed to compile, the error being the /EXTRACT keyword. I looked at the
> definition of strsplit.pro and found no reference to the keyword
> argument /EXTRACT. Anybody know about this?

This sounds suspiciously like a case where your IDL path is not being
set right.  If IDL can't find out that STRSPLIT is a function, then it
assumes it's a *variable* instead.  That's a problem, because you are
using the /EXTRACT keyword, and you can't subscript variables with a
keyword :-)

So the first question is: what does your !PATH look like?  Second
question is, what happens when you ".COMPILE STRSPLIT"?  And finally,
if those worked, can you still not compile your original function?

Your question about why /EXTRACT doesn't appear in the definition of
strsplit.pro is actually a separate issue altogether.  Those keywords
are passed automatically and implicitly using one of the _EXTRA
mechanisms.

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------