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

Home » Public Forums » archive » User selectable lower array bound?
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: User selectable lower array bound? [message #26164 is a reply to message #25981] Mon, 06 August 2001 13:52 Go to previous messageGo to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Paul van Delst wrote:
>
> "Pavel A. Romashkin" wrote:
>>
>> Craig Markwardt wrote:
>>>
>>> Well, as grumpy as I have been in the past about IDL wishes, this is
>>> one thing I do not want to have in IDL now!
>>
>> I am with you Craig. Besides, for the purists of array indexing, I think
>> it is unfair to dasignate a *lower* array bounds. We don't designate the
>> *upper* one.
>
> In the context of initially declaring an array in IDL, sure you do:
>
> x = fltarr(10)
>
> declares the upper bound as 9. We also designate a lower bound: 0. The difference between
> the two is that I can change the former.
>
>> To be exact, we need a zero point fixed
>
> why?
>
>> and the ability to
>> extend an array in both directions. This way, I can add data in both
>> positive and negative directions.
>
> Why would this functionality be any different to what exists now? And, to me at least,
> allowing -ve indices would make this sort of data manipulation easier to understand, i.e.
> extend array in -ve direction => negative indices.

The most annoying thing about IDL arrays to me is the need always to
test whether they exist or not when concatenating onto them. The idea
of extending arrays in both directions would be neatly summed up by
allowing:

a=[b,a] & a=[a,b] even if a doesn't (yet) exist.

Either that, or IDL needs a list type which allows such operations.
Wasn't that just me ranting about special case functionality leading to
inconsistency?

But anyway, my $2e-2.

JD
[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
Previous Topic: IDL virtual reality (was 3D Object IDL )
Next Topic: problem getting values from cw_bgroup normal base

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

Current Time: Wed Oct 08 16:49:25 PDT 2025

Total time taken to generate the page: 0.00493 seconds