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

Home » Public Forums » archive » Re: Format codes in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Format codes in IDL [message #31071] Tue, 18 June 2002 12:59 Go to next message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
astib@cc.usu.edu (Asti Bhatt) writes:

> Hi everybody,

> I am having a problem applying format codes to 'NaN', i.e.
> !VALUES.F_NAN. When I try to assign this value to some variable and
> read it from the command line in Macintosh and Linux, it gives me
> error that 'Format code ... cannot be applied to 'variable'. It gives
> it for all format codes. The interesting thing is, I have one such
> statement in my code, it runs okay under Linux machine, but crashes
> under Macintosh. I do not understand this. If anybody has got any
> experience regarding the same and would help me, I would appreciate
> that.

I'm not sure what you mean. Do you mean that if you do something like

IDL> a = !values.f_nan
idl> READ, prompt='Input A: ', a, format='(F10.7)'

that it will cause an error?

Bill Thompson
Re: Format codes in IDL [message #31219 is a reply to message #31071] Tue, 18 June 2002 21:40 Go to previous message
astib is currently offline  astib
Messages: 15
Registered: June 2002
Junior Member
Hi,

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).

Do you know if rsi has any patch for this ? I searched the website for
this, but couldn't get anything.

Thanks,
Asti


thompson@orpheus.nascom.nasa.gov (William Thompson) wrote in message news:<aeo3f4$3g1$1@skates.gsfc.nasa.gov>...
> astib@cc.usu.edu (Asti Bhatt) writes:
>
>> Hi everybody,
>
>> I am having a problem applying format codes to 'NaN', i.e.
>> !VALUES.F_NAN. When I try to assign this value to some variable and
>> read it from the command line in Macintosh and Linux, it gives me
>> error that 'Format code ... cannot be applied to 'variable'. It gives
>> it for all format codes. The interesting thing is, I have one such
>> statement in my code, it runs okay under Linux machine, but crashes
>> under Macintosh. I do not understand this. If anybody has got any
>> experience regarding the same and would help me, I would appreciate
>> that.
>
> I'm not sure what you mean. Do you mean that if you do something like
>
> IDL> a = !values.f_nan
> idl> READ, prompt='Input A: ', a, format='(F10.7)'
>
> that it will cause an error?
>
> Bill Thompson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Format Codes in IDL 5.2
Next Topic: Re: Multiple journal files on linux

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

Current Time: Wed Oct 08 19:05:03 PDT 2025

Total time taken to generate the page: 0.41181 seconds