On Sun, 16 Jul 2017 10:34:18 -0400
DaWorm <daw...@gmail.com> wrote:

> If the programmer builds a case statement on an enum, that includes all of
> the possible enum values, and also includes an else clause, to me it seems
> the programmer is implicitly telling the compiler that there is the
> possibility of illegal values stored in the enum.

IMO the word "illegal" is wrong here.
Usually this is used for future extensions. For example when eventually
the enumtype is extended by a new value. The 'else' part can for
example raise an exception. So the 'else' part is not for handling
"illegal", but not-yet-known values.


Mattias
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to