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

Home » Public Forums » archive » How to plot multiple charts and ho to round float to specific precision?
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: How to plot multiple charts and ho to round float to specific precision? [message #44968 is a reply to message #44858] Thu, 28 July 2005 08:46 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
liko2@o2.pl wrote:
> No, it has to be a value of variable, later used for a part of title of
> a chart. So it has to be exact value with only 2 digits after zero.

If the only thing you're going to do with the variable is print it as
part of a title of a chart, isn't it sufficient to know how to print it
with only 2 digits after zero? Are there any calculations you intend to
perform, where it's important to use the rounded value, rather than the
exact value, in those calculations? I've seen situations where
something like that was actually the right thing to do, but they're not
very common.

If you do actually need the value of the variable rounded, and not just
the display of the variable, then the expression you've already been
given does the job:

value = ROUND(100.0*x)/100.0
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: CALL_EXTERNAL and C++ code
Next Topic: Re: Multilayered plots

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

Current Time: Wed Oct 08 17:11:46 PDT 2025

Total time taken to generate the page: 0.00355 seconds