version 2003
PA_CheckFreeStack (request) Long
Parameter | Type | Description | |
request | long | Requested stack size in bytes | |
Function result | Long | Free stack in bytes |
Description
The routine PA_CheckFreeStack checks to see if the current process' stack can hold the amount of stack passed in request and returns the amount of stack available. If you want to know the amount of available stack, pass 0 as the requested stack.
NOTE:
It the stack cannot hold the amount passed in request, 4D displays an alert ("The stack is full").
Example
Check if there enough stack to launch a method without displaying an alert.
char HaveEnoughStack(long amount) { return (char) (PA_CheckFreeStack(O) >= amount) ? 1 : 0; }
See Also
No reference.
Error Handling
Use PA_GetLastError to see if an error occurred (eER_StackIsFull).