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

Home » Public Forums » archive » Re: Recognizing double precision?
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: Recognizing double precision? [message #56155 is a reply to message #56145] Fri, 05 October 2007 10:26 Go to previous messageGo to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"wlandsman" <wlandsman@gmail.com> wrote in message
news:1191597160.614557.153160@50g2000hsm.googlegroups.com...
> About once a year I receive a complaint about my code because someone
> inputs a Julian date like this
>
> IDL> jd = 2441636.1
>
> and then gets mysterious results because the value of jd is
> "truncated"
>
> IDL> print, jd, f='(f10.2)'
> 2441636.00

Well, to play devil's advocate, the programmer should not let the
user input single precision data in such a case.

If type eq Singleprecision then message, 'ERROR'


Cheers,
bob

PS
(Because the above statement does exactly what the user
"intended", inputs a single precision variable.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: running my procedure in VM
Next Topic: Re: stippling or cross hatching in contour plot

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

Current Time: Sun Oct 12 13:08:48 PDT 2025

Total time taken to generate the page: 1.11818 seconds