[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User selectable lower array bound?
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 ...
Sure. It's just a matter of personal preference.
This stuff fits into the "same dog different leg" category. :o)
paulv
--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.