Enumerated Type problem(Solved) lazarus / 61-Beginners ---------------------------------------------------------------------- JLWest · 2021-09-22 04:10 I get an error on Line 12. unit1.pas(962,27) Error: Label used but not defined "ARGUMENTS" ARGUMENTS is defined as the first enumerated type in headers. I don't understand. Help please Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Headers = ( Arguments, FunctionResult, Description,              SeeAlso, TheLast, NilHearer );   function TForm1.NextHeader( AHEADER : Headers; AARG,AFUNRESULT,ADESC,ASEE : Boolean ) : Headers;   Var   sHeader : Headers;   NHeader : Headers = TheLast;  begin        for sHeader := Arguments to NilHeader do begin          Arguments      : begin                         if sHeader = AHeader then Continue;                         if AARG then NHeader :=  FunctionResult;                        end;          FunctionResult : begin                           if sHeader = AHeader then Continue;                           if AFUNRESULT then NHeader :=  FunctionResult;                          end;          Description    : begin                           if sHeader = AHeader then Continue;                           if ADESC then NHeader :=  Description;                          end;          SeeAlso        : begin                           if sHeader = AHeader then Continue;                           if ASEE then NHeader :=  SeeAlso;                          end;          TheLast        : NHeader :=  TheLast;          NilHeader      : NHeader :=  NilHeader;        end;        Result := NHeader;   end; ---------------------------------------------------------------------- af0815 · 2021-09-22 05:12 It looks you have mixed the syntax of 'if' and ' case' statement. https://wiki.freepascal.org/Case https://wiki.freepascal.org/IF ---------------------------------------------------------------------- JLWest · 2021-09-22 05:38 Thanks but I still don't get it.  The if's have nothing to do with case statement. ---------------------------------------------------------------------- bytebites · 2021-09-22 05:47 case missing Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i        for sHeader := Arguments to NilHeader do begin         case sheader of   //<--------         Arguments      : begin ---------------------------------------------------------------------- JLWest · 2021-09-22 06:08 Yea, Thanks Got it.