YouTip LogoYouTip

Func Csng

VBScript CSng Function | Rookie Tutorial

VBScript CSng Function | Rookie Tutorial

Rookie Tutorial -- Learning is not just technology, but also dreams!

VBScript Tutorial

VB TutorialVB UsageVB VariablesVB ProceduresVB ConditionalsVB LoopingVB SummaryVB ExamplesVB FunctionsVB Keywords

VBScript Examples

VBScript Keywords

Deep Dive

script

Scripting Language

Computer

Script

Programming

Development Tools

Computer

Software

Computer Hardware

Computer Science

VBScript CSng Function


VBScript Reference Manual 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

Try it Yourself Β»


VBScript Reference Manual Complete VBScript Reference Manual

← Func CstrFunc Clng β†’