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

Home » Public Forums » archive » Re: negation operator
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: negation operator [message #49328 is a reply to message #49324] Thu, 13 July 2006 07:15 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
Hi,

On Thu, 13 Jul 2006, greg michael wrote:

> This is odd...
>
> IDL> print,-100 > -90 < 90
>
> print,-100 > -90 < 90
> ^
> Syntax error.
> IDL> print,-100 > (-90) < 90
> -90
>
> Is there any reason why a negation operator should ever come lower than
> anything else?
>
> Greg
>
>

yes, operator precedence. <, > and unary - has the same precedence in IDL,
so they can not follow each other immediately.

regards,
lajos

ps: in this respect I have followed the C precedence rules in FL, where
unary + and - have higher precedence than * (multiplication). So in FL
the above statements are correct and give the same result.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mac OS X: Creating PDF figures from within IDL
Next Topic: Re: IDL and Macs. Speed is not only about squared roots

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

Current Time: Sat Oct 11 10:26:32 PDT 2025

Total time taken to generate the page: 0.70355 seconds