| DOLLARFORMAT | |
| 説明
文字列を米国通貨形式に設定します (米国通貨以外については、 LSCurrencyFormat または LSEuroCurrencyFormat を使用します)。 |
|
| 戻り値
小数点以下 2 桁で、1000 単位のセパレータ、およびドル記号を使用して形式設定した数値の文字列。number が負の数値の場合、戻り値は括弧で囲まれます。number が空の文字列の場合はゼロが返されます。 |
|
| カテゴリ
表示および書式制御関数 |
|
関数のシンタックスDollarFormat(number) |
|
| 関連項目
DecimalFormat、NumberFormat |
|
| パラメータ
|
|
例<!--- この例は、DollarFormat の使用方法を示しています。 --->
...
<h3>DollarFormat の例</h3>
<cfloop from = 8 to = 50 index = counter>
<cfset full = counter>
<cfset quarter = counter + (1/4)>
<cfset half = counter + (1/2)>
<cfset threefourth = counter + (3/4)>
<cfoutput>
<pre>
bill #DollarFormat(full)# #DollarFormat(quarter)#
#DollarFormat(half)# #DollarFormat(threefourth)#
18% tip #DollarFormat(full * (18/100))#
#DollarFormat(quarter * (18/100))#
#DollarFormat(half * (18/100))#
#DollarFormat(threefourth * (18/100))#
</pre>
</cfoutput>
</cfloop>
...
|
|
| NUMBER | |
| 形式設定する数値です。 | |