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

Home » Public Forums » archive » Re: Casting floating point number into e-notation
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: Casting floating point number into e-notation [message #4554 is a reply to message #4551] Fri, 09 June 1995 00:00 Go to previous message
Tim Hammond is currently offline  Tim Hammond
Messages: 1
Registered: June 1995
Junior Member
cavanaug@uars1.acd.ucar.edu (Charles Cavanaugh) wrote:
>
> Please, please, please somebody tell me what I'm doing wrong with
> my attempt to cast a floating point value into e-notation (using
> our old buddy IDL) :
>


I'm not sure if this is exactly what you were asking, but to read a float
value into a string in exponential form you can simply use:

IDL> a=3.567
IDL> b=strtrim(string(a,format='(e11.4)'),2)
IDL> print,b
3.5670e+00
IDL> help,b
B STRING = '3.5670e+00'

If you actually want to force the numbers themselves to appear in this
format whatever their value then I'm afraid I can't help, sorry...

All the best,

Tim Hammond.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Widget convulsions.
Next Topic: Re: No more plot_io, plot_oi, plot_oo calls in IDL version 4.0?????

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

Current Time: Sun Oct 12 23:57:30 PDT 2025

Total time taken to generate the page: 0.01764 seconds