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

Home » Public Forums » archive » Re: if evaluation
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: if evaluation [message #67356 is a reply to message #67351] Wed, 15 July 2009 05:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Alessio writes:

> I need to understand how line below is evaluated in pv-wave, because I
> must convert it to C.
>
> AND abs(rg(w)-rg(index)) LT (50<rg(index)>20)
>
> This line is a part of an "if" condition.
>
> The trouble part is "(50<rg(index)>20)".
> How this part is evaluated ?
> Supposing rg(index) is 15, the condition will be evaluated in ?

The statement is evaluated left to right.

Compare 50 and rg(index) and take the smaller
of those two values. Take that value and
compare it with 20 and take the larger of
those two values.

Here is an article on precedence:

www.dfanning.com/misc_tips/precedence.html

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Message error after 200 iterations using MCTK in IDL
Next Topic: Re: Plot3 IDL

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

Current Time: Sat Oct 11 14:07:23 PDT 2025

Total time taken to generate the page: 1.12358 seconds