Re: Rounding question

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 45868
interpreted = N
texte = on 12/1/02 11:21 PM, Dennis J. Bonsall, Jr. at dbonsall@webbuilders.com so noted...> 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).[math]ceil(11.1811*100)/100[/math] Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.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)
on 12/1/02 11:21 PM, Dennis J. Bonsall, Jr. at dbonsall@webbuilders.com so noted...> 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).[math]ceil(11.1811*100)/100[/math] Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.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/ Rob Marquardt

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:

Getting Total Quantity (1997) WebCat2 - Getting to the browser's username/password data (1997) Server slowing down. (1997) [spawn] processes (2004) WebCat.acgi from /cgi-bin/? (1997) $Replace with [founditems] (1997) Nav. 4 probs with cart - Serious problem (1997) TCP Connect for a newbie (2002) Submitting ampersands in forms... (1998) Nesting format tags (1997) Runtime version ... (2003) Shownext never shows next...still (1997) WCS Newbie question (1997) Nested tags count question (1997) Emailer errors (1997) Banner Ads (2000) [dos] command (1997) $Quit, $CloseDatabase corrections (1997) (2000) WebCat2b12 forgets serial # (1997)