VBScript » Statements » Const

Version: 1.0

Syntax:
Const

The Const statement allows you to declare your own constants.

Once you declare a constant, you cannot change the value of that constant. If you try to change the value, you will get an error message (illegal assignment).

Examples

Code:
<% Const myconstant = 71.348 %>
Our current interest rate is <% =myconstant %> % per year.
Output:
Our current interest rate is 71.348 % per year.
Language(s): VBScript
Code:
<% Const stringconstant = "Please send money!", someconstant = .277, tigre = "Jaguar" %>
Explanation:

You can declare several constants at the same time.

Language(s): VBScript

See Also: