A #Constant is the opposite of a variable.
Like a variable it too can hold a value but unlike a variable it's value is constant.
Sounds pretty pointless right?
Well, not really. I find they come in very handy when writing your code because they tidy things up a little.
For example: If I have a complex equation that I struggle to remember and can't be bothered typing each time I use it, then I could declare it as a #constant (have a look at 'c' in the code) or maybe I just want to replace values with words to make it make it easier to remember what they are doing. (Black & White in the code)
#Constant c a+b
#Constant White 1
#Constant Black 0
a = 2
b = 3
d = Black
print "a = " + str$(a)
print "b = " + str$(b)
print "c = " + str$(c)
if d = White then Print "It's all good!"
if d = Black then Print "It's not very good at all"
a = 56
d = White
print
print "a = " + str$(a)
print "b = " + str$(b)
print "c = " + str$(c)
if d = White then Print "It's all good!"
if d = Black then Print "It's not very good at all"
wait key
end