Crystal Reports for Rational Application Developer 設計工具指南
Fix
說明
Fix 會將數字刪減到指定的小數位數,並將它傳回。
多載
Fix (數字)
Fix (數字, #位數)
引數
數字引數是即將刪減的數值,它可以是正數、0 或負數。
#位數引數是選擇性的數字,指出即將刪減的小數位數。如果省略的話,就假設是 0。
傳回
可以是正數、0 或負數的整數值。
動作
如果省略 #位數的話,就假設是 0。
範例
Fix (123.678)
傳回 123。
Fix (-123.678)
傳回 -123。
Fix (123.678,1)
傳回 123.6。
Fix (123.678,2)
傳回 123.67。
註解
Fix (n) 與
「Int (數字)」
的作用相同,但是當 n 是負數時,Fix 會傳回第一個大於或等於 n 的整數,而 Int 則傳回第一個小於或等於 n 的整數。例如:
Fix (-10.2)
傳回 -10。
Int (-10.2)
傳回 -11。
Fix 與
「Truncate」
是相等的函式。
Business Objects, SAP 子公司
http://www.taiwan.businessobjects.com/
支援服務
http://www.taiwan.businessobjects.com/support/
產品說明文件網站
http://support.businessobjects.com/documentation/