How BlitzCC handles Const

Blitz3D Forums/Blitz3D Programming/How BlitzCC handles Const

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

As far as I know it simply replaces the constant variable with the value held by it. ie:
Const a = 32
Const b = 15
Print a
Becomes:
Print 32
So I think only the ones that are actually used have any impact on the program.

Interesting fact: A constant can actually be overwritten locally by functions:
Const a = 32
Print a
Print NotSoConst(16)
Function NotSoConst(a)
  Return a
End Function
And the same goes for global variables.

Fredborg