Posts: 6,419
Threads: 74
Joined: Mar 2002
Maybe I should've said "the calculation of the factorial" ...
Posts: 3,368
Threads: 195
Joined: Jan 2003
oh, yeah. :lol:
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 1,439
Threads: 15
Joined: Apr 2003
Recursive procedures are good for things such as flood-fill type image manipulation or pathfinding, but the stack size of the programming language (QB's is 256kb, I think) limits the number of times a proc can call itself. Therefore, it is best for one to implement one's own stack and put all the code in one procedure. This takes a little more code and effort, but allows processing of larger amounts of data.
Posts: 3,343
Threads: 83
Joined: Mar 2003
Recursion not good... My first game had the game loop in a sub and, of course, you never managed to get very far (you'd have to see the code to see what I mean but it's too long). Moral: put game loop in main module. Always.