The pragma provides an estimated value for the stack size requirement.
Methods with recursive calls cannot pass a stack check because stack usage cannot be determined. As a result, a warning is issued. To prevent this warning, you can give the method an estimated value (in bytes) for the stack size requirement. Then the method passes the stack check successfully.
Syntax
{attribute 'estimated-stack-usage' := ' <estimated stack size in bytes> '}
Insert location: First line above the declaration part of the method.
Example
{attribute 'estimated-stack-usage' := '127'} // 127 bytes METHOD PUBLIC DoIt : BOOL VAR_INPUT END_VAR
For more information, see: ⮫ “Calling a Method ”
-
Recursive method call