is there any function or easy to always round up a number, please?
Jenny
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk
is there any function or easy to always round up a number, please?
Jenny
Round()
http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt274.htm
Will
~|
Adobe® ColdFusion® 8 software 8 is the most important
Did this but it looks messy, maybe there is a better way?
cfoutput
cfset Num = 1.1
cfset RoundNum = #round(Num)#
Cfif roundnum lt num
cfset roundNum = roundNum +1
/Cfif
#roundNum#
/cfoutput
~|
Adobe® ColdFusion® 8 software 8
Ceiling actually:
http://www.cfquickdocs.com/#Ceiling
Round might round down; the OP wants to round up always.
On Sun, Mar 23, 2008 at 9:04 PM, Will Tomlinson [EMAIL PROTECTED] wrote:
is there any function or easy to always round up a number, please?
Jenny
Round()
http
Sorry, the link shoudl be http://www.cfquickdocs.com/#Ceiling?getDoc=Ceiling
On Sun, Mar 23, 2008 at 8:08 PM, James Holmes [EMAIL PROTECTED] wrote:
Ceiling actually:
http://www.cfquickdocs.com/#Ceiling
Round might round down; the OP wants to round up always.
On Sun, Mar 23, 2008 at 9
Ceiling actually:
http://www.cfquickdocs.com/#Ceiling
Oh heck. I thought it might be ceiling(), but figured it didnt matter if it
went down .
Will
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release
hi Will ..
round makes 1.1 into 1 ... need 1 to be 2 ..
-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED]
Sent: 23 March 2008 12:05
To: CF-Talk
Subject: Re: Round Up
is there any function or easy to always round up a number, please?
Jenny
Round()
http
sweet .. thanks James
-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: 23 March 2008 11:08
To: CF-Talk
Subject: Re: Round Up
Ceiling actually:
http://www.cfquickdocs.com/#Ceiling
Round might round down; the OP wants to round up always.
On Sun, Mar 23, 2008 at 9
Round might round down;
Well, as far as I know, this is what round means, no?
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
sorry for the OT, does any Perl expert out there know what's the perl
function to round up a decimal value? this is my first time doing perl and i
don't seems to find it in the ref. book that i had.
~~
Get the mailserver that powers this list
what's the perl function to round up a decimal value?
ceil() rounds up to the next integer. It's in the POSIX module.
**
Information in this email is confidential and may be privileged.
It is intended for the addressee only
Anyway know a quick way to round a value _up_ to the 500th? In other words:
400 - 500
600 - 1000
1499 - 1500
1501 - 2000
This is for real estate calculations.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Simon Park Computer Systems Management, Inc.
[EMAIL PROTECTED]
09, 2000 9:34 AM
To: '[EMAIL PROTECTED]'
Subject: round up to the 500th
Anyway know a quick way to round a value _up_ to the 500th? In other words:
400 - 500
600 - 1000
1499 - 1500
1501 - 2000
This is for real estate calculations
Or, if you want to avoid the CFIF, you could just do this:
CFSET num = 500 + ((num-1) \ 500) * 500
Chris Lennon
A Terra Nova Design Technologies, inc.
-Original Message-
From: me
This should work, I think...
CFIF num MOD 500
CFSET num = 500 + (num \ 500) * 500
/CFIF
where num is
14 matches
Mail list logo