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

Home » Public Forums » archive » Re: Clever Where() test
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: Clever Where() test [message #4366] Fri, 26 May 1995 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <3q2tld$8du@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov (William Thompson) writes:
|> Paul Probert <probert@uwmfe.neep.wisc.edu> writes:
|>
|> >IDL allows you to give a zero subscript to a scalar,
|> >so you can say:
|> > i=WHERE(...)
|> > IF i(0) EQ -1 THEN BEGIN
|> > ...
|> >
|> >One word of caution. If you have a scalar element of a structure,
|> >for some reason you can't do this:
|> > x={i:0,j:1}
|> > IF x.i(0) ... ;bombs
|> >But you can make it work with more parentheses:
|> > IF (x.i)(0) ... ;works
|> >
|> > Paul Probert
|> > University of Wisconsin
|>
|> So does x(0).i
|>
|> Bill Thompson
|>

Just nit-picking: If the tag i in x.i is an array, only
the (x.i)(0) notation works. This works if x and/or i are
arrays (or scalars).


Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: V4.0 Exclusive Button Groups
Next Topic: Different FFT-results on vector and array?!

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

Current Time: Wed Oct 08 15:33:08 PDT 2025

Total time taken to generate the page: 0.00444 seconds