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

Home » Public Forums » archive » Re: Top 10 IDL Requests
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: Top 10 IDL Requests [message #20629 is a reply to message #20627] Tue, 18 July 2000 00:00 Go to previous messageGo to previous message
landsman is currently offline  landsman
Messages: 93
Registered: August 1991
Member
In article <on66q4a433.fsf@cow.physics.wisc.edu>,
craigmnet@cow.physics.wisc.edu wrote:

> * A way to index strings like arrays.
>
> I know we can use STRMID and STRPUT, but it seems that an array-like
> notation would fit so much better with the philosophy of IDL.
>

If I understand you correctly, then this was syntax that IDL used in its
ancient (Version 1) history, e.g. if st was a string array, then
st(3:5,*) extracted the third through fifth characters of all elements
of the array. Of course, this was when IDL was limited to
fixed-length string arrays. With the current variable length string
arrays, things are more complicated but the notation is still feasible.
For example, the first dimension of a string array could be defined to
be the maximum string length in the array.

But I am not sure that such a change would be desirable. First of
all would be the difficulty in making a syntax change backwards
compatible. The change of the string syntax from V1 to V2 probably
required more coding changes than any other syntax change ever made to
IDL. Also, some syntax would become more complicated -- for example, the
current extraction of elements of a string array st1 = st[3:5] would
have to become st1 = st[*,3:5]. V5.3 introduced many string
processing enhancements (e.g. STRMID now accepts vector parameters), so
I think all the functionality of the array notation is now available in
then string processing functions. Finally, one can always index strings
like arrays by first converting them with BYTE().

--Wayne Landsman landsman@mpb.gsfc.nasa.gov

P.S. I heartily endorse a COMPLEMENT keyword to the WHERE function.


Sent via Deja.com http://www.deja.com/
Before you buy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: assignment inside boolean expression
Next Topic: Re: Link IDL to ORACLE Pro*FORTRAN

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

Current Time: Wed Oct 08 17:19:10 PDT 2025

Total time taken to generate the page: 0.00787 seconds