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

Home » Public Forums » archive » Re: printing floats/integer
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: printing floats/integer [message #24113 is a reply to message #24111] Thu, 08 March 2001 07:16 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Sean Heukels wrote:
>
> What if I dont know that the float will
> be 8 in length and has 6 decimals ??

You, as the user of the number, have to specify something about what you want for the
output format. E.g. maximum length, how many decimal places, etc. IDL, and computers in
general, have absolutely no intelligence - that's where the user comes in. :o) If you
don't know what the size of the number will be, use exponential format.

> How can we put this in a subroutine, that handles
> a variable (e.g. PRO FORMAT, var1) and returns
> the right way to print ??

You haven't defined what "right" is in a way a program can understand it.



--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
paul.vandelst@noaa.gov Alexander Pope.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: contour labels question
Next Topic: Color 'n linestyle picker for Plot

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

Current Time: Fri Oct 10 01:36:57 PDT 2025

Total time taken to generate the page: 0.64137 seconds