Skip to main content

Compiler Warning C0584

Message: Maximum nesting depth exceeded

Possible error cause: Very deeply nested sequences, especially in IF–THEN–ELSE constructs or WHILE/FOR loops.

Error correction:

Reduce the nesting depth of your sequence where the error message was issued.

Example 516. Example of the error:
IF CASE_INPUT = 1 THEN
    Local_ULINT := Local_ULINT+1;
ELSIF CASE_INPUT = 3 
    THEN Local_BOOL := NOT Local_BOOL;
ELSIF CASE_INPUT = 4 
    THEN Local_ULINT := 4;
ELSIF CASE_INPUT = 5 
    THEN Local_ULINT := 5;
( . . . )
ELSIF CASE_INPUT = 9999 
    THEN Local_ULINT := 9999;
ELSIF CASE_INPUT = 10000 
    THEN Local_ULINT := 10000;
END_IF

Message:

C0584: Maximum nesting depth exceeded