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

Home » Public Forums » archive » Re: Unknown #INFO
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: Unknown #INFO [message #13441 is a reply to message #13433] Thu, 12 November 1998 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Stein Vidar Hagfors Haugan (steinhh@ulrik.uio.no) writes:

>> David Fanning <davidf@dfanning.com> wrote:
>>>
>>> IDL> Help, !Values, /Structure
>>> ** Structure !VALUES, 4 tags, length=24:
>>> F_INFINITY FLOAT 1.#INF0
>>> F_NAN FLOAT 1.#QNAN
>>> D_INFINITY DOUBLE 1.#INF000
>>> D_NAN DOUBLE 1.#QNAN00
>>>

>> My sun gives this:
>> IDL> print,!version
>> { sparc sunos unix 5.0 Apr 28 1997}
>> IDL> print,!values
>> { Inf NaN Infinity NaN}
>> IDL> print,float('Inf')
>> Inf
>> IDL> print,float('1.#INF0')
>> 1.00000
>
> I guess you're right on the spot with the assumption that the
> compiler (or rather, the c library) makes the difference:
>
> IDL> print,!version
> { alpha OSF unix 5.1.1 Jul 20 1998}
> IDL> print,!values
> { INF NaNQ INF NaNQ}
> IDL> print,float(['INF','Inf','NaN','nanq'])
> % Type conversion error: Unable to convert given STRING to Float.
> % Detected at: $MAIN$
> INF INF 0.00000 NaNQ


Hang on there. Here is what I get in IDL 5.2 beta 2:

IDL> Print, !Version
{ x86 Win32 Windows 5.2 Beta2 Sep 14 1998}

IDL> Help, !Values, /Structure
** Structure !VALUES, 4 tags, length=24:
F_INFINITY FLOAT Inf
F_NAN FLOAT NaN
D_INFINITY DOUBLE Infinity
D_NAN DOUBLE NaN

IDL> Print, !Values
{ Inf NaN Infinity NaN}

IDL> Print, Float( [ 'Inf', 'NaN', 'Infinity', 'NaN' ] )
Inf NaN Inf NaN

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Talking with my C data
Next Topic: Device's bits_per_pixel keyword

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

Current Time: Sun Oct 12 00:02:24 PDT 2025

Total time taken to generate the page: 0.01068 seconds