Latest web development tutorials

VBScriptのCSng関数

VBScriptのリファレンス 完全なVBScriptのリファレンス

単精度に式を変換するCSng関数(シングル)を入力します。

式は数値でなければなりません。

文法

CSng(expression)

参数 描述
expression 必需。任何有效的表达式。

<script type="text/vbscript">

document.write(CSng("300000") & "<br />")
document.write(CSng(1536.75263541) & "<br />")
document.write(CSng(-6700000) & "<br />")

</script>

上記の出力の例:

300000
1536.753
-6700000

»をお試しください

VBScriptのリファレンス 完全なVBScriptのリファレンス