[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: N_ELEMENTS and WHERE: Scalar or Array ?*From*: wmc(at)bas.ac.uk*Date*: 3 Feb 1999 10:03:26 GMT*Newsgroups*: comp.lang.idl-pvwave*References*: <78s23o$525$1@nnrp1.dejanews.com> <36b57934.0@news.nwl.ac.uk> <793vuv$euv$1@readme.uio.no> <36b5d66b.0@news.nwl.ac.uk> <796jda$c52$1@readme.uio.no>*Sender*: William Connolley <wmc(at)bsaicdf.nerc-bas.ac.uk>*User-Agent*: tin/pre-1.4-981114 ("The Watchman") (UNIX) (OSF1/V4.0 (alpha))*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:13535

Stein Vidar Hagfors Haugan <steinhh@ulrik.uio.no> wrote: >In article <36b5d66b.0@news.nwl.ac.uk> wmc@bas.ac.uk writes: >> If this is necessary for legacy reasons, it might be possible to make >> () and [] behave differently in this case? Possibly a missed >> opportunity when [] came in! >How'bout {} ? :-) I'm not *just* kidding. [] work as both array >constructors and indexing brackets, so {} could work as both >structure constructors and indexing brackets.. Hmm, having three different sorts of brackets to make arrays is a bit of overkill. Anyway, {} might be needed for associative arrays one day! >>> array[NaN] = 5 ; Would be allowed, but does nothing >> >>This could well be possible as an easy-to-do work-around. In that >>case, where would have to return NaN not -1. >(Yes - though with a WHERE(..,/nan) switch) Hmm, that would be acceptable. Or an nwhere function (a bit less typing). >>Incidentally, I've just realised how dangerous the out-of-bounds stuff >>is: >> >> array([where(array eq false)])='stoat' >> >>assigns to the first element... >And you can *bet* some program(mer)s out there are counting on >exactly this as a *feature*! Sorry to say so, but...that's why >you'd have to introduce a keyword switch in WHERE. Well, they are very silly people then. Does anyone on this newsgroup want to confess to using this "feature"? -W. -- William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/ Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself

**Follow-Ups**:**Re: N_ELEMENTS and WHERE: Scalar or Array ?***From:*Stein Vidar Hagfors Haugan

**Re: N_ELEMENTS and WHERE: Scalar or Array ?***From:*David Fanning

**References**:**Re: N_ELEMENTS and WHERE: Scalar or Array ?***From:*wmc

**Re: N_ELEMENTS and WHERE: Scalar or Array ?***From:*Stein Vidar Hagfors Haugan

**Re: N_ELEMENTS and WHERE: Scalar or Array ?***From:*wmc

**Re: N_ELEMENTS and WHERE: Scalar or Array ?***From:*Stein Vidar Hagfors Haugan

- Prev by Date:
**Re: N_ELEMENTS and WHERE: Scalar or Array ?** - Next by Date:
**Re: N_ELEMENTS and WHERE: Scalar or Array ?** - Prev by thread:
**Re: N_ELEMENTS and WHERE: Scalar or Array ?** - Next by thread:
**Re: N_ELEMENTS and WHERE: Scalar or Array ?** - Index(es):