VBScript CSng Function | Rookie Tutorial
Rookie Tutorial -- Learning is not just technology, but also dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
VBScript Tutorial
VB TutorialVB UsageVB VariablesVB ProceduresVB ConditionalsVB LoopingVB SummaryVB ExamplesVB FunctionsVB Keywords
Deep Dive
script
Scripting Language
Computer
Script
Programming
Development Tools
Computer
Software
Computer Hardware
Computer Science
VBScript CSng Function
Complete VBScript Reference Manual
The CSng function converts an expression to a Single (single-precision) type.
The expression must be a numeric value.
Syntax
CSng(expression)
| Parameter | Description |
|---|---|
| expression | Required. Any valid expression. |
Example
Example
<script type="text/vbscript">
document.write(CSng("300000") & "<br />")
document.write(CSng(1536.75263541) & "<br />")
document.write(CSng(-6700000) & "<br />")
</script>
The above example outputs:
300000
1536.753
-6700000
YouTip