Skip to main content
Search

Compiler Warning C0508

Message: Ambiguous use of name'<identifier>'

Possible error cause: A local variable of a program has the same name as an action of the program.

Error correction: Change the name of the local variable.

Example 478. Example of the warning
FUNCTION_BLOCK FBRead_Var
VAR_INPUT
END_VAR
...

PROGRAM PLC_PRG
VAR
    read_input : FBRead_Var;
END_VAR
read_input(); // Call of the action read_input

The declaration of the variable read_input produces the following warning.

Message:

C0508: Ambiguous use of name 'READ_INPUT'