Attribute ‘estimated-stack-usage’ΒΆ

Since stack checking with recursive methods cannot work because the stack consumption cannot be determined, a warning is always displayed. With this pragma you can specify the estimated stack size for a recursive method and thus prevent this warning from always being displayed.

Syntax:

{attribute 'estimated-stack-usage' := '<permitted stack size in bytes>'}

Insertion position: first line above the declaration part of the method.

Example

{attribute 'estimated-stack-usage' := '99'}
METHOD xxMETH : INT
VAR_INPUT
END_VAR
VAR
 next: AFB;
 big: ARRAY[0..100] OF DINT;
END_VAR
 next.xxMETH();