ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






FUNCTION:  CSng( )

You can determine the expression subtype by using the function VarType( ).


CSng(Number)

The CSng function converts any number to the variant of subtype Single.

Converts to values ranging from
-3.402823E38 to -1.401298E-45 for negative values and 1.401298E-45 to 3.402823E38 for positive values.

Code:
<% anynumber=5678.123 %>
<% =CSng(anynumber) %>

Output:
5678.123