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 #26085 is a reply to message #25981] Fri, 03 August 2001 16:11 Go to previous messageGo to previous message
Jeff Guerber is currently offline  Jeff Guerber
Messages: 41
Registered: July 2000
Member
On 3 Aug 2001, Stein Vidar Hagfors Haugan wrote:

> Paul van Delst <paul.vandelst@noaa.gov> writes:
>
> [..]
>> Well, maybe WHERE could work as it does now, but for cases where the start index is not
>> zero, a function like the Fortran 90 intrinsic LBOUND() could be used.
>>
>> BTW, I never check the WHERE result either, always the COUNT value.
>
> Funny, I [almost] never use the COUNT value.. If you're writing an IF
> test, the information is there anyway..
>
> ix = where(nonzero)
> IF ix[0] ne -1 THEN ...

Stein Vidar, the point I was making about WHERE was that with definable
lower bounds, -1 could be a legitimate index into the array, but
consistently using COUNT avoids this problem. I was also speculating that
WHERE returning lbound-1 would be consistent with its current behavior,
and wouldn't break (as many) existing programs, in which the arrays have
an implicit lbound=0 (and thus lbound-1 = -1).

(Actually, I've been known to use either form, depending on how I feel
at the time. :-) I've been trying to use COUNT more, though.)

There are other problems, though. <sigh>

Jeff Guerber
Raytheon ITSS
NASA Goddard Space Flight Ctr
Oceans & Ice Branch (code 971)
[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:49 PDT 2025

Total time taken to generate the page: 0.00489 seconds