Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 16309, case statement tag protection

by Peter Laman Email: Anonymous


Wanted: protection of case statements against undefined labels
Download Details
FTP  download also available 0 bytes
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 1.0  to 6.0 13 downloads
Copyright: No significant restrictions


Size: 0 bytes
Updated on Thu, 05 Jul 2001 06:24:44 GMT
Originally uploaded on Thu, 05 Jul 2001 06:47:00 GMT
Description
Suppose one creates a type definition like:
TStatus = (stInit, stProcessing, stFininished)

and uses it in:
case Status of
stInit: ....;
stProcessing: ....;
stFininished: ....;
end;

If, in a new version, a new status is introduced, one would have to verify that all relative case statements are updated with the new status. It would help a lot, if Delphi would supply some help with it, for example with a 'scan for incomplete case statements' command, or a compiler warning if a case statement with a enumerated type does not include all possible case labels, or an else clause.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Server Response from: ETNACDC03