Re: Rounding question

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 45865
interpreted = N
texte = [format .2f][math][number]+.005[/math][/format] On Monday, December 2, 2002, at 12:21 AM, Dennis J. Bonsall, Jr. wrote:> Is there any way, when using the [format] context, to round up the > resulting value. For instance, lets say I have a value of 11.1811. > > When used in the following format context: > > [format .2f]11.1811[/format] > > The result is 11.18, as it should be. But, is there any way I can get > that to round up to two decimal places, so that it appears as 11.19? > The [math] context has a ceil option, but it rounds up to the nearest > integer (11.1811 becomes 12). > > Thanks for the help, > > Dennis > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Rounding question (Rob Marquardt 2002)
  2. Re: Rounding question (Clayton Randall 2002)
  3. Re: Rounding question (Alain Russell 2002)
  4. Rounding question (Dennis J. Bonsall, Jr. 2002)
[format .2f][math][number]+.005[/math][/format] On Monday, December 2, 2002, at 12:21 AM, Dennis J. Bonsall, Jr. wrote:> Is there any way, when using the [format] context, to round up the > resulting value. For instance, lets say I have a value of 11.1811. > > When used in the following format context: > > [format .2f]11.1811[/format] > > The result is 11.18, as it should be. But, is there any way I can get > that to round up to two decimal places, so that it appears as 11.19? > The [math] context has a ceil option, but it rounds up to the nearest > integer (11.1811 becomes 12). > > Thanks for the help, > > Dennis > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Clayton Randall

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatb15 Mac CGI -- [purchase] (1997) WebCat, sudo and ImageMagick (2002) pull downs (1997) itools webcat atartup (2000) How to Display text in empty fields (1997) PIXO support (1997) RE: [WebDNA] Use of MySQL with WebDNA (2010) WebDNA Solutions ... sorry! (1997) Getting a domain listening on port 443 and port 80? (2003) Re2: AAgghh!! Help, please. SSL strikes again. (1997) Upgrade to Tiger? (2006) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) Upgrade Problem.... (1998) Exclamation point (1997) Error -108 (1997) Firesite and [referrer] atg broke (1997) [if] (2003) Is this google friendly? (2003) Stats (2004) Canadian Credit Card processing co, from a Mac (2001)