亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

VBS教程:函數(shù)-Int、Fix 函數(shù)

 更新時(shí)間:2006年11月16日 00:00:00   作者:  

Int、Fix 函數(shù)

返回?cái)?shù)字的整數(shù)部分。

Int(number)

Fix(number)

number 參數(shù)可以是任意有效的數(shù)值表達(dá)式。如果 number 參數(shù)包含 Null,則返回 Null。

說(shuō)明

IntFix 函數(shù)都刪除 number 參數(shù)的小數(shù)部分并返回以整數(shù)表示的結(jié)果。

IntFix 函數(shù)的區(qū)別在于如果 number 參數(shù)為負(fù)數(shù)時(shí),Int 函數(shù)返回小于或等于 number 的第一個(gè)負(fù)整數(shù),而 Fix 函數(shù)返回大于或等于 number 參數(shù)的第一個(gè)負(fù)整數(shù)。例如,Int 將 -8.4 轉(zhuǎn)換為 -9,而 Fix 函數(shù)將 -8.4 轉(zhuǎn)換為 -8。

Fix(number) 等同于:

Sgn(number) * Int(Abs(number))

下面的示例說(shuō)明 IntFix 函數(shù)如何返回?cái)?shù)字的整數(shù)部分:

MyNumber = Int(99.8)    ' 返回 99。MyNumber = Fix(99.2)    ' 返回 99MyNumber = Int(-99.8)   ' 返回 -100。MyNumber = Fix(-99.8)   ' 返回-99。MyNumber = Int(-99.2)   ' 返回 -100。MyNumber = Fix(-99.2)   ' 返回 -99

相關(guān)文章

最新評(píng)論