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

Home » Public Forums » archive » strange "eq" behaviour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
strange "eq" behaviour [message #69770] Mon, 15 February 2010 07:27 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
Hi folks,
sometimes it's hard to understand IDL interprets, e.g.:

IDL> print,maxx
1.00000
IDL> help,maxx
MAXX FLOAT = 1.00000
IDL> if maxx eq 1. then print, 'true' else print,'wrong'
wrong
IDL> if maxx eq 1 then print, 'true' else print,'wrong'
wrong
IDL> if maxx eq float(1) then print, 'true' else print,'wrong'
wrong
IDL> if maxx eq maxx then print, 'true' else print,'wrong'
true
IDL> if maxx[0] eq 1 then print, 'true' else print,'wrong'
wrong
IDL> if maxx[0] eq 1. then print, 'true' else print,'wrong'
wrong
IDL> if 5 eq 5. then print, 'true' else print,'wrong'
true


What's going wrong here? Has somebody an idea? Is this a bug or a
feature ;)
I use IDL 6.4.1 within Windows 7 x64 Pro

Thanks and regards

Chris
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: strange "eq" behaviour
Next Topic: Re: Segfault when smoothing image

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

Current Time: Fri Oct 10 23:52:56 PDT 2025

Total time taken to generate the page: 1.12552 seconds