Constants

Xojo Version 2021 r3.1

Description

Constants are a type of variable that is considered "protected". A constant variable will keep its assigned value throughout the program execution and is not changed.

We generally write Constant variables in uppercase letters. Constants must always be initialized to a value when they are declared.

Syntax

Var VARIABLE-NAME As data-type = value 

Examples

Const MEANING As Integer = 42
Const PI As Double = 3.14159