Skip to main content

Compiler Error C0136

Message: ambiguous use of name '<variable name>'

Possible error cause: A variable is declared in multiple GVLs.

Error correction: Qualify the variable with the desired GVL.

Example of the error:

PROGRAM PLC_PRG
VAR
    j : INT := g_i;
END_VAR

GVL1:
VAR_GLOBAL
    g_i : INT;
END_VAR

GVL2:
VAR_GLOBAL
    g_i : INT;
END_VAR

--> C0136: nicht eindeutige Verwendung des Namens 'g_i'

Error correction:

Beispiel:
j : INT := GVL1.g_i;

Note

When this error occurs, all positions of multiple use are output in the message view (C0181).