How does CONST compile?

BlitzMax Forums/BlitzMax Programming/How does CONST compile?

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.

Paul and Toby are correct. Constants do not "use memory" as they are hardcoded into your program as immediate values at compile time - that's why you can't change them at runtime.

More importantly however constants do not have to be seperately fetched from memory, but are loaded into the CPU instruction pipeline, during the initial instruction fetch.

Check the assembly output if you're in doubt.