Conversion Functions ASP Script - ASP Web Pro
  Active Server Pages Programming by ASP Web Pro

ASP Scripts

CONVERSION FUNCTIONS

Conversion functions allow you to change the subtype of a variable. VBScript assigns the variant type to all variables as a default, but there are many cases when you might have to convert a variable to a particular type to satisfy an arguement. A common example would be that you might have a string arguement that returns a numeric value or a numeric arguement that returns a string value. Here are some of the most commonly used conversion functions:

CByte

CByte(strExample)

The CByte function converts this variable to a subtype byte.

CDbl

CDbl(strExample)

The CDbl function converts this variable to a subtype double.

CInt

CInt(strExample)

The CInt function converts this variable to a subtype integer.

CLng

CLng(strExample)

The CLng function converts this variable to a subtype long.

CStr

CStr(strExample)

The CStr function converts this variable to a subtype string.

< Back to ASP Scripts


 

 

Main Menu
Home
ASP Scripts
ASP Tutorials
JavaScripts
Awards
Contact Us

Email This Page

Other Resources
ASP Web Hosting
Search Engine Submission
Programming Help

 

 

 

Other ASP Web Sites

Site Map

 

Last Updated:
21 March 2010