Latest web development tutorials

VBScript Fix function

VBScript Reference Complete VBScript Reference

Fix function returns the integer portion of the specified number.

Note: If thenumber parameter contains Null, returns Null.

Tip: See the Int function.

grammar

Fix(number)

参数 描述
number 必需。有效的数值表达式。

Examples

Example 1

<script type="text/vbscript">

document.write(Fix(6.83227) & "<br />")
document.write(Fix(6.23443))

</script>

Examples of the above output:

6
6

try it"

Example 2

<script type="text/vbscript">

document.write(Fix(-6.13443) & "<br />")
document.write(Fix(-6.93443))

</script>

Examples of the above output:

-6
-6

try it"

VBScript Reference Complete VBScript Reference