The VBScript Network and Systems Administrator's Cafe

May 23 2008   8:00PM GMT

VBScript Statements: Explanation of the Const Statement



Posted by: Jerry Lees
Tags:
Const
Const statement
VBScript
VBScript Statements
vbscriptstatements

The Const statement is useful when you want to reference a specific, unchanging, value in your code multiple times without typing it over and over.

For example, in order to use the Const Statement to create a reference to the value of pi to 50 decimal places, you use the following code:

Const pi = 3.14159265358979323846264338327950288419716939937510

The important thing to remember is that, constants can not be changed once set in your code– Doing so will result in an error being thrown.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: