This seems silly

Blitz3D Forums/Blitz3D Programming/This seems silly

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.

John big10p:
If we are talking of stacks I thought of stacks like functions create them: An enclosed area of memory which holds all the local datas of the function and that is deallocated after the function exits again. This way local and global variables don't interfere with each other for example.

This part of memory that leads to stack overflows with over-recursived programs.


The mainprogram is the core stack
Every function adds a new memory block on this stack and removes it again on exit.

But gosubs don't create a memory block to the stack as they operate on the core stacks data ( which is the reason you can declare globals there, which is the reason you can change "normal" variables of the core program )