Re: Roundup
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 36561
interpreted = N
texte = Assuming all your original numbers have two digits after the decimal point:[text]originalNumber=65.13[/text][text]noLastDigit=[getchars start=2&from=end][originalNumber][/getchars][/text][text]lastDigit=[getchars start=1&end=1&from=end][originalNumber][/getchars][/text][showif 0=[lastDigit]][text]newNumber=[originalNumber][/text][/showif][showif 5=[lastDigit]][text]newNumber=[originalNumber][/text][/showif][showif a1234^[lastDigit]][text]newNumber=[noLastDigit]5[/text][/showif][showif a6789^[lastDigit]][text]newNumber=[math][noLastDigit]+1[/math]0[/text][/showif]The new value is [newNumber]>Has any Webcater out there worked around rounding up to the .05?>>I have some calucations which come out as 65.13. What I need is to have to>round up or down. Here in Switzerland we usually dont use the 1 cent, 2>cent, etc. We round everything up or down.>>Everything below 5 is rounded down and everything above up. So 65.13 should>acutally show 63.10 and 63.17 should be 63.20.>>Trying ceil and floor does not help because it rounds the whole int and not>only the .05 part. Any work arounds?>>Sincerely,>Nitai Aventaggiato>>-->We make tools to energize your business>Content Management & eBusiness Systems>>ComputerOil GmbH http://computeroil.com>Hauptstrasse 12 info@computeroil.com>8252 Schlatt/Switzerland>Tel: +41 (0)52 654 15 55>>>------------------------------------------------------------->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://search.smithmicro.com/=================================================Kenneth Grome WebDNA Consultanttelephone number: 011 63 32 486-9077telephone number: 011 63 919 749-0060business web site: http://webdna.netpersonal web site: http://kengrome.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://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Assuming all your original numbers have two digits after the decimal point:[text]originalNumber=65.13[/text][text]noLastDigit=[getchars start=2&from=end][originalNumber][/getchars][/text][text]lastDigit=[getchars start=1&end=1&from=end][originalNumber][/getchars][/text][showif 0=[lastDigit]][text]newNumber=[originalNumber][/text][/showif][showif 5=[lastDigit]][text]newNumber=[originalNumber][/text][/showif][showif a1234^[lastDigit]][text]newNumber=[noLastDigit]5[/text][/showif][showif a6789^[lastDigit]][text]newNumber=[math][noLastDigit]+1[/math]0[/text][/showif]The new value is [newNumber]>Has any Webcater out there worked around rounding up to the .05?>>I have some calucations which come out as 65.13. What I need is to have to>round up or down. Here in Switzerland we usually dont use the 1 cent, 2>cent, etc. We round everything up or down.>>Everything below 5 is rounded down and everything above up. So 65.13 should>acutally show 63.10 and 63.17 should be 63.20.>>Trying ceil and floor does not help because it rounds the whole int and not>only the .05 part. Any work arounds?>>Sincerely,>Nitai Aventaggiato>>-->We make tools to energize your business>Content Management & eBusiness Systems>>ComputerOil GmbH http://computeroil.com>Hauptstrasse 12 info@computeroil.com>8252 Schlatt/Switzerland>Tel: +41 (0)52 654 15 55>>>------------------------------------------------------------->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://search.smithmicro.com/=================================================Kenneth Grome WebDNA Consultanttelephone number: 011 63 32 486-9077telephone number: 011 63 919 749-0060business web site: http://webdna.netpersonal web site: http://kengrome.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://search.smithmicro.com/
Kenneth Grome
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:
Permissions / Restart WebDNA? (2005)
Release of 2.01? (1997)
Fulfillment e-mail? (1998)
[WriteFile] problems (1997)
THE ANSWER - why .HTML pages no processing? (2000)
[append] and SSL (1997)
Dubble Bubba (1999)
AddLineItem Problem (1997)
Tea Room trouble (1997)
AppleScript: Tell application:app location? (1998)
[WebDNA] WebDNA glitch, no response required ... (2009)
charging? (2001)
RE: Error reading data -1 (1997)
[WebDNA] Easy Grep Question (2012)
RE: WebDNA-Talk searchable? (1997)
Need relative path explanation (1997)
PIXO (1997)
Showing specific [cart] contents (1998)
Text data with spaces in them... (1997)
Not really WebCat (1997)