[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: JULDAY 5.4 not same as 5.3?
"Mark Hadfield" <m.hadfield@niwa.cri.nz> writes:
>> And what would you do with a number like -('ffffffff'xul), ie a number
>> that to begin with is too large to fit into a signed type.
>
> Now, that is a good point.
>
> There are other situations where auto-magical type conversion could save
> programmers' skins but is not done by IDL, e.g. 32767S + 1S evaluates
> to -32767S, not 32768L. Hands up who hasn't been stung by that one!
That were exactly my thoughts when I was thinking about the -1b
problem lately, and was the reason I didn't ask here at that time.
Just as a similar problem showed up, I decided to shout ;^>
So the essence is boundary checks are (and should stay) a work for the
programmer (which is perfectly OK for me....).
Peter
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr. Peter "Pit" Suetterlin http://www.astro.uu.nl/~suetter
Sterrenkundig Instituut Utrecht
Tel.: +31 (0)30 253 5225 P.Suetterlin@astro.uu.nl
__________________________________________________________________________