[fpc-devel] Minor debate with ISO standard on case blocks
Paul Breneman
Paul2006 at BrenemanLabs.com
Tue Jul 30 12:26:32 CEST 2019
This message thread has been interesting to read.
I just realized today that I dealt with similar issues in Delphi 19
years ago. This is discussed in the good Microsoft Press book *Code
Complete* by Steve McConnell. Using the default else block of a case
statement to show a program error message is exactly what is recommended
on pages 319-320 (and the same thing for repeated if statements on page
316). I don't know if this directly applies, but it was fun to renew a
few brain cells by looking at old emails.
If I add an enumerated type and forget to update some of my code, I'd
like to get an error message when the unchanged code is run.
Regards,
Paul
www.ControlPascal.com
More information about the fpc-devel
mailing list