The VBScript Network and Systems Administrator's Cafe

May 23 2008   8:00PM GMT

VBScript Statements: Explanation of the Const Statement

Jerry Lees Jerry Lees Profile: Jerry Lees

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.

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:

Share this item with your network: