Ask a Question related to Macromedia ColdFusion, Design and Development.
-
miki #1
numberformat - is optional no longer optional?
Hey all, we just switched to mx. mx 7 is on our horizon, but not close enough
for me. I have a problem with numberformat that i did not have on cf5. When i
apply the optional (9 or _) formatting after a decimal place it is forcing 0.
Now, it used to truly be optional. However now it's apparently only optional
if it's to the left of the decimal place. Is there a work-around? EXAMPLES
#numberFormat(999.99, '999,999.9999')#<br /> #numberFormat(9999.99,
'999,999.0999')#<br /> return the following 999.9900 9,999.9900 other options
i tried include: #numberFormat(999.99, '999,999.____')#<br /> and
#numberFormat(99.9900)#<br /> every single one of them has the trailing 0. my
final goal is to have a) a database value of 9999.900 appear as 9,999.9 as
well as b) NOT to have 99.997 appear as 99.9970. If i can reach the second
goal (b) i will not worry about the first so much. Is there a workaround for
these so-called optional digit place holders when they are refusing to be
optional? Thanks
miki Guest
-
Optional Arguments in a CFC
Let's say I have the following function in a CFC: <cffunction name="init" access="public" output="false"> <cfargument name="id" type="numeric"... -
Optional properties
If you have a data class, Person, with two properties, FirstName and LastName, and at a later stage you want to add a new optional property to the... -
WSDL and Optional Parameters
Since there's no way to create a c# method with optional, or nullable parameters. And since you can't write an overloaded web method. Is it... -
Optional Parameters ASP to SQL stored procedure
Hi there, Can someone help, this is driving me crazy I have written a stored procedure in sql with input, output and return parameters. This... -
preg_match_all optional subpattern
Using preg_match_all, I need to capture a list of first and last names plus an optional country code proceeding them. For example: ... -
OldCFer #2
Re: numberformat - is optional no longer optional?
As I remember, Numberformat() has always acted like this. Whether you use "9"
or "0"
on the right side of the decimal, it will always display the number of
formatting characters.
The reason for this is the decimal portion of numbers are not padding, but a
part of the
number. Take 1.120045 , for example. If you numberformat() it with "00.999"
it will display
01.120 because the left side 0 is padding, the right side 0 is not..
OldCFer Guest



Reply With Quote

