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

Home » Public Forums » archive » Conversion Error?
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: Conversion Error? [message #16820 is a reply to message #16680] Mon, 16 August 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Laurent Chardon (chardons@NOT_THISsprint.ca) writes:

> Thanks David and Martin for your help. So if I understand properly, IDL uses
> fix() by default when converting doubles to integer. That's tricky. Does it
> make sense to do that?

Well, probably LONG by default. I just happened to
choose FIX. But definitely *not* ROUND.

Does it make sense? Yes, I think so. It is consistent.
You know what to expect. If *you* want to round, there
is a routine to do that. It requires a bit of knowledge
about how numbers work on computers. Computer scientists
learn that, of course, but the rest of us learn it when
we need it (I.e., after struggling for hours trying to
figure out why our results are not what we expect.)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: looking for some software to convert idl format data to text
Next Topic: seperators in menus

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

Current Time: Sun Oct 12 14:45:53 PDT 2025

Total time taken to generate the page: 1.36155 seconds