VBScript Tutorials - Herong's Tutorial Examples - Version 5.20, by Dr. Herong Yang

Built-in Conversion Functions

This section provides a list of commonly used built-in conversion functions.

VBScript supports the following commonly used conversion functions:

  • CBool(vVariant) - Converts an expression to a variant of subtype Boolean
  • CByte(vVariant) - Converts an expression to a variant of subtype Byte
  • CCur(vVariant) - Converts an expression to a variant of subtype Currency
  • CDate(vVariant) - Converts a valid date and time expression to the variant of subtype Date
  • CDbl(vVariant) - Converts an expression to a variant of subtype Double
  • CInt(vVariant) - Converts an expression to a variant of subtype Integer
  • CLng(vVariant) - Converts an expression to a variant of subtype Long
  • CSng(vVariant) - Converts an expression to a variant of subtype Single
  • CStr(vVariant) - Converts an expression to a variant of subtype String

Table of Contents

 About This Book

 Introduction of VBScript - Visual Basic Scripting Edition

 Variant Data Type, Subtypes, and Literals

 Arithmetic Operations

 Numeric Comparison Operations and Logical Operations

 String Operations - Concatenation and Comparison

 Variable Declaration and Assignment Statement

 Expression and Order of Operation Precedence

 Statement Syntax and Statement Types

 Array Data Type and Related Statements

 Array References and Array Assignment Statements

 Conditional Statements - "If ... Then" and "Select Case"

 Loop Statements - "For", "While", and "Do"

 "Function" and "Sub" Procedures

Built-in Functions

 Built-in Math Functions

Built-in Conversion Functions

 Built-in String Functions

 Built-in Date and Time Functions

 Built-in Array Functions

 Built-in Misc. Functions

 Inspecting Variables Received in Procedures

 Error Handling Flag and the "Err" Object

 Regular Expression Pattern Match and Replacement

 scrrun.dll - Scripting Runtime DLL Library

 Creating Your Own Classes

 IE Web Browser Supporting VBScript

 IIS ASP Server Supporting VBScript

 WSH (Windows Script Host)

 References

 Printable Copy - PDF Version

Built-in Conversion Functions - Updated in 2015, by Dr. Herong Yang