28 th Jun 2022 21:49:57
Hai Friend , Sign In
Home
World
INDIA
Chennai City
Games
Developers
Members
Birthday
Search
Astrology
G. K.
Story
Tamil Nadu Government Holiday List 2018 in English and Tamil   *   Trichy: Wanted - PHP, MySql Programmers. Contact trichy people only 84894 28 444.   *   Indian Railways New Train Number List [Search / Enquiry / Locator / Finder]   *   பன்றிக் காய்ச்சல் பற்றி அறிந்து கொள்ளுங்கள் (Swine Flu H1N1)
See Also
Type Conversion Functions Type Conv. Functions
Visual Basic Functions Visual Basic Functions
Visual Basic Home Visual Basic Home
 
Description  Syntax  Return Datatype  Example  Migration

CSng Function - Visual Basic 6.0 (VB 6.0)

Returns an expression that has been converted to a Variant of subtype Single.
Syntax:
CSng(expression)
Parameter Description
expression Required. The expression argument is any valid expression.

Return Data type:
Single
Example:
Statement Result Remark
CSng(1) 1  
CSng(2.5 / 3) 0.8333333  
CSng(0) 0  
CSng(-1) -1  
CSng(unknown) 0 uninitialized Variable
CSng(Null) Error Invalid use of Null
CSng("abcd") Error Type mismatch
CSng(True) -1 True - Non Zero
CSng(False) 0 False - Zero
Go to top

Migration from Visual Basic 6.0 (VB 6.0) to
  CSng Function in VB Script (VBS)
  CSng Function in JScript (JS)
  CSng Function in ASP (Active Server Page)
  CSng Function in PHP Script
  CSng Function in MS-Access
  CSng Function in MS SQL Server
  CSng Function in Oracle
  CSng Function in C Language
  CSng Function in C++ Language
  CSng Function in Foxpro
  CSng Function in Fortran
  CSng Function in MS Excel Sheet
Go to top
 





© 2021 Chennaiiq.com. All Rights Reserved.

4804