VBScript CCurFunction


VBScript 参考手册Complete VBScript Reference Manual

The CCur function converts an expression to a Currency type.

The expression must be a numeric value.

Syntax

CCur(expression)

Parameters Description
expression Required. Any valid expression.

Example

Example 1

<script type="text/vbscript">

document.write(CCur(30) & "<br />")

</script>

The above example outputs:

30

Try it yourself »

Example 2

Note that the CCur function rounds to 4 decimal places:

<script type="text/vbscript">

document.write(CCur(5.9555555555555) & "<br />")

</script>

The above example outputs:

5.9556

Try it yourself »

VBScript 参考手册Complete VBScript Reference Manual Other Extensions