[fpc-pascal] "Case of" documentation

Howard Page-Clark hdpc at talktalk.net
Sat Nov 24 22:40:30 CET 2012


Describing the Case statement The FPLanguageReference.pdf 10.2.2 says:

The constants appearing in the various case parts must be known at 
compile-time, and can be of the following types : enumeration types, 
Ordinal types (except boolean), and chars.

Why the "except boolean"? I find the compiler happily accepts a boolean 
expression as a case selector, as well as True and False as 
corresponding labels, and the resulting compiled code performs as you 
would expect.

Howard



More information about the fpc-pascal mailing list