functions calling self

Blitz3D Forums/Blitz3D Beginners Area/functions calling self

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.

They're known as recursive functions.

You could write a function, for instance, to scan the entire contents of your hard drive - it'd work by scanning each object. If its a file, add the filename to a list. If its a folder, the function can then call itself and read the contents of that folder, checking for more files and sub-folders ad infinitum.

To answer the original question - yes, it will resume from the point where it left off.

Dynaman's example above will eventually cause a stack overflow error (once he puts an 'End Function' in there, that is). ;)