RAD Studio (Common)
ContentsIndex
PreviousUpNext
E2074: Label declared and referenced, but not set: '%s' (Delphi)

You declared and used a label in your program, but the label definition was not encountered in the source code.

  program Produce;

    procedure Labeled;
    label 10;
    begin
      goto 10;
    end;

  begin
  end.

Label 10 is declared and used in the procedure 'Labeled', but the compiler never finds a definition of the label.

  program Produce;

    procedure Labeled;
    label 10;
    begin
      goto 10;
      10:
    end;

  begin
  end.

The simple solution is to ensure that a declared and used label has a definition, in the same scope, in your program.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!