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

Home » Public Forums » archive » Format codes in IDL
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: Format codes in IDL [message #31208 is a reply to message #31077] Wed, 19 June 2002 08:23 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
thompson@orpheus.nascom.nasa.gov (William Thompson) writes:

> astib@cc.usu.edu (Asti Bhatt) writes:

>> No, if I do like -
>> IDL>x = !values.f_nan
>> IDL> read,format = '(3f10.3)', b
>> and if in the input i give x, it will give me an error. Not only NaN,
>> but if I say x=2 and try to give it as input to read with format
>> specified, it will give me error. And this is typical to Macintosh. I
>> tried same thing under Linux and it works fine. Actually I have a .dat
>> file from which I need to read data, there are some NaN's also, and on
>> macintosh, it refuses to read it by giving this error - %Unable to
>> apply format code blah blah to 'variable'(whatever it is).

> You mean that you're reading in from the keyboard, and instead of typing in a
> number, you type in the character name of an IDL variable? That certainly
> doesn't work on my machine under 5.4. Was this something added to 5.5? I get

> IDL> x=3
> IDL> read,format='(3f10.3)',b
> : x
> % Unable to apply format code F to input: "x".
> % Execution halted at: $MAIN$

Actually, I think I've figured out what it is your trying to say. You're
trying to read the actual characters "NaN" into a variable.

Maybe it's an IDL version issue. On my Alpha workstation running Tru64 Unix
with IDL/v5.4 I can read in NaN with format statements, but only if the
characters "NaN" are aligned with the left side of the field. Preceeding blank
characters cause the error message

% Unable to apply format code F to input: " NaN ".

Maybe this is fixed in later versions of IDL?

Bill Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Lost my 'info' structure
Next Topic: Using COM objects in IDL (Win32 only)

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

Current Time: Thu Oct 23 01:38:59 PDT 2025

Total time taken to generate the page: 4.88025 seconds