#Constants are essentially identical to #define rather than const in C/C++
This is to say that they're a Pre-Processor Features (something that occurs at compile time, rather than runtime)
Although #Constant is frustratingly less feature complete as #define.
What I mean is., #define allows for operators, thus you can create macro programs
So let's say we want to write a Min/Max Function
Well said function would be:
Function Min( A, B )
If A < B Then ExitFunction A Else ExitFunction B
EndFunction
Now as a #define we could do:
#define Min(a,b) ( (a) < (b) ? (a) : (b) )
Of course we don't actually have the Ternary Operator... which is a shame, as it's a great little operator.
It's a Binary Operator, so it's quick in C/C++
Essentially it's a True/False Check...
A ? B : C ... literally translates to If B = True Then A = B Else A = C
This makes it great for our Min / Max Macro Definition above.
Now a reason why this works in C/C++ is because the Compiler is smart enough to replace the Inputs on the Left with the Right., where-as AGK/DBP this doesn't happen.
It instead would literally look for Min( A, B ) as opposed to Min( [ParameterA], [ParameterB] )
This said it also doesn't work like 'const' because what const does is creates static memory... this means the Memory Address for a given Variable NEVER changes., and in most cases also can't be written to; thus the value remains constant from when it's initially defined until the application ends.
I think this is the behaviour that TGC is trying to provide; but being a Pre-Processor somewhat diminishes it's usefulness... that is to say you don't necessarily need Static / Constant values that aren't reliant upon other inputs.
So let's say we're creating an Audio Subsystem... well "Constants" you will want are going to be the Audio Device, Audio Format and Speaker Format., but you'll want these as Constants ONLY while said Device is Active; you might still want to then redefine that later when you change to a new Device with different Formats... BUT you don't want these values to change until you destroy the last one (thus all of the associated Constants)
It's the same with Audio Buffers associated with such; you likely want their Memory Addresses to remain Static rather than Defining and Redefining that requires Allocation and Deallocation to constantly happen (which is a performance hit).
Thus Constants come in useful for doing such actions.
For perhaps a less Low-Level Example., let's say we have a Level where we want a Constant Seed Value., and Various Defines that are going to remain constant (and need to) while the Level is Active but you'd want to re-define once you're all done... well yeah a Pre-Processor approach isn't very useful for that.
I think the kicker to all of this., is for C/C++ you'd be using these for Application Stability and/or Performance; where-as for AppGameKit Script., there's not really much difference and you're more limited in the scope.
Be it from a Macro Definition standpoint (or lack there-of) or that it's Pre-Processor and MUST be defined at initial Runtime rather than during Runtime.