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 #4375 is a reply to message #4370] Thu, 25 May 1995 00:00 Go to previous messageGo to previous message
Paul Probert is currently offline  Paul Probert
Messages: 7
Registered: May 1995
Junior Member
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
[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 17:27:39 PDT 2025

Total time taken to generate the page: 0.00520 seconds