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 #4370 is a reply to message #4366] Thu, 25 May 1995 00:00 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
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
[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 19:33:06 PDT 2025

Total time taken to generate the page: 0.00387 seconds