Re: Problem with STRSPLIT using /EXTRACT [message #25105] |
Thu, 17 May 2001 10:43 |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
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?
> I tried looking this question up in the Google Usenet archive, but no
> luck. Is this the most uptodate location for the (truncated) Usenet
> archive?
> Marianne
> P.S. You should see what I got at www.dejavu.com!
It sounds like you're getting two different versions of the routine. According
to the documentation for the version supplied by RSI:
;+
; NAME:
; STRSPLIT
;
; PURPOSE:
; Wrapper on the build in system routine STRTOK that implements exactly
; the same interface as STRTOK, but with the STRSPLIT name.
;
; The reason for doing this is so that if a user has their own
; STRSPLIT in their local user library, their version will superceed
; this one. RSI does not recommend this practice, but it is
; allowed for backwards compatability reasons. ...
As I recall, this was because there used to be a routine called strsplit.pro in
one of the big IDL libraries. Probably, you're getting different versions in
the path first, depending on whether you go through IDLDE or the command line
mode. The version supplied by RSI has the /EXTRACT keyword, so if you change
your calls to use STRTOK instead, you should be okay.
Bill Thompson
|
|
|
Re: Problem with STRSPLIT using /EXTRACT [message #25117 is a reply to message #25105] |
Wed, 16 May 2001 16:26  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
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
------------------------------------------------------------ --------------
|
|
|