[Thread Prev][Thread Next][Index]

Re: [ferret_users] problems when listing integers



Hi Ingo,
Ferret doesn't list using integer formats. Here's the piece from the Users Guide, under LIST/FORMAT=

Notes for LIST/FORMAT: 

1)    All output values, regardless of the /FORMAT designation, will be of type single precision floating point. For FORTRAN output formats this means all numerical field specifiers must be "F", "E", or "G".

So, you can do a

LIST/FORMAT=(F4.0) 1

Ansley

Ingo Bethke wrote:
Hi,

I've tried to make FERRET list some integer values to a text file
but run into some weird behaviour:

The result of

 yes? list /format="(i4.4)" 1

is **** , and not 0001 as expected. However, when I add some digits e.g.

 yes? list /format="(i10)" 1

then the result is 1065353216 i.e. absolutely not what I want.

Am I doing anything wrong here? as a workaround one could convert everything to strings, but I wondered if there was a better way...

Cheers, Ingo



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement