From Firewing

Reference: Constants

 [private | public] const identifier as type = expression

A constant declaration can be used in a program or module in place of a literal value. Constant data cannot be changed at runtime (that is, you cannot assign a new value to a constant when your program is executing). However, constants have the advantage of making your code much more readable and manageable. You can declare constants one at a time, like this

Const maxSamples As Byte= 20
Const sizeOfArray As Byte = 20

You can also use an expression on the right hand side of a constant declaration. For example,

Const hello As String = "Hello"
Const helloWorld As String = Hello + " World"
Const valueA As Single = 12 * 0.4
Const valueB = valueA + 10

Constants, unlike program variables, do not use RAM to store their values. If a constant is used in a program expression, code memory is used instead. When declaring numeric constants, or when using numeric literals in your program, you can use different number representations.

Decimalnone100100 decimal
Binary&B&B1004 decimal
Octal&O&O1210 decimal
Hexadecimal&H&H100256 decimal
Retrieved from
Page last modified on December 09, 2012, at 12:31 PM