STACKLEFT()

Returns the number of bytes left on the system stack.

Example:

	println "There are ",STACKLEFT()," bytes left on the stack"
	;recursive call support
	function stan(integer i,string str)
		if(stackleft() > STK_LIMIT) stan(i,"Debra")
	endfunc

This function was added to support nested and recursive function calls. Since function calls take a lot of stack space. As of now only about 26 nested or recursive calls can eat up the stack. This lets the programmer know when he/she is running out of stack space as to avoid a runtime error. Both recursion and nested function calls should check this value if more than just a few calls are to be executed.
See also: StackErr StackAbort