PA_CheckFreeStack

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_CheckFreeStack (request) Long

ParameterTypeDescription
requestlongRequested stack size in bytes
Function resultLongFree 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).


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next