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 62 structured variables not allowed here pp 323</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Error 62           Structured Variables not Allowed Here             pp 323

 Source:  Compiler

 Cause:   A structured variable is used where a simple type is expected.

 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;
          IntVar   :  Integer;          { Simple type is not structured    }

       BEGIN
          IntVar   := Colors;           { Wrong - Colors is structured     }
          IntVar   := Ord (Colors[0]);  { Right - Ord provides byte type   }
       END.

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