Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> error 60 constants are not allowed here pp 323</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Error 60               Constants are not Allowed Here                pp 323

 Source:  Compiler

 Cause:   Constant is being where a structured type is required.

 Remedy:  Examine the statement ahead of the error cursor for the above
          condition.


 ----------------------------------------------------------------------------


 Example:
       TYPE
          ColorTyp  =  (Red,Yel,Blu,Blk,Grn);
       VAR
          Colors    :  Array [0..4]     { Structured type                  }
                         of ColorTyp;

       BEGIN
          Colors    := 4;               { Wrong - 4 is a simple constant   }
          Colors[0] := Grn;             { Right - use enumerated type      }
       END.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson