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

Home » Public Forums » archive » Re: STRMID question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: STRMID question [message #26275] Mon, 20 August 2001 11:57
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
IDL online help says:

"The form of First_Character and Length control how they are applied to
Expression. Either argument can be a scalar or an array:
* If a scalar value is supplied for First_Character and Length, then
those values are applied to all elements of Expression. The result has
the same structure and number of elements as Expression.
* If First_Character or Length is an array, the size of their first
dimension determines how many substrings are extracted from each element
of Expression. We call this the "stride". If both are arrays, they must
have the same stride. If First_Character or Length do not contain enough
elements to process Expression, STRMID automatically loops back to the
beginning as necessary. Excess values are ignored. If the stride is 1,
the result will have the same structure and number of elements as
Expression. If it is greater than 1, the result will have an additional
dimension, with the new first dimension having the same size as the stride."

BTW, are the delimiters exactly what you mean they should be?
IDL> delim1 = STRPOS( s, '_', /REVERSE_SEARCH ) + 1
IDL> print, delim1
1 1 1 1 1 1
1
1 1 1
IDL> print, delim2
1 2 3 4 5 6
7
8 9 10


Also, could the expected result be achieved using STRPLIT, /EXTRACT?

Cheers,
Pavel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Limitations in IDL 5.4
Next Topic: on-screen slider

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

Current Time: Wed Oct 08 19:33:53 PDT 2025

Total time taken to generate the page: 0.00531 seconds