AL - Some people think Pascal is old-fashioned. That means they don't know what it can do in modern OOP implementations. If you look at the discussion about division problems in another topic you can lots of pointless (or point-rich!) issues. With strict typing the compiler catches most errors before you get to run anything.
For example:
Integer division: C := A div B;
Floating point division: C := A / B;
The second will produce a compiler error unless C is a floating-point type: (single, double, extended)
To focus in this thread: you can declare an array of an enumerated type:
Type TWombat = (twNone,twOneEar,twTwoEars,twOneEye,twHandsome);
TWombatArray = array [twNone..twHandsome] of TWombat;
This is good because if you try to assign something outside the range the compiler will point this out. This is better than using constants.
Better still - your enumerated type can be a set of up to 256 attributes:
Type TWombatSet = set of TWombat;
var MyNiceWombat: TWombatSet;
MyNiceWombat := [twTwoEars,twHandsome];
These language attributes, in my experience, make programming faster, clearer and more efficient. I don't want indeterministic behaviour - I want the compiler to nag me until there are no warnings or errors!
-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL