Const Statement

Gives a name to a value that does not change.

Syntax

Const declarator [ , declarator ]…

Parts

declarator
Mandatory one or more declarations with a comma between each.

Declarator

name [ As type | In unit ] = expression
name
Mandatory name for a value type.
type
Optional elementary data type.
unit
Optional unit of measure..
expression
Mandatory constant expression.

Instructions

Const is short for “constant”.

TODO

Examples

Const MaxLength As UInt = 32768
Const HTTP_GET = "GET", HTTP_POST = "POST"
Const ScalingFactor = 5.0 / 3.0

See also