Const (statement)

<< Click to Display Table of Contents >>

Const (statement)

Const Name = Expression

Defines a symbolic name for a constant.

Constants defined outside of procedures are always global.

A type suffix (e.g. % for Integer, see the section Data types) can be attached to the name, determining the data type of the constant. Otherwise, the type is Long, Double or String, depending on the value.

See also: section Data types

Example:

Global Const GlobalConst = 142

Const MyConst = 122

Sub Main

 Dim Answer, Msg

 Const PI = 3.14159

 .

 .

 .