[fpc-devel] Minor request with case else branches

J. Gareth Moreton gareth at moreton-family.com
Fri May 24 23:45:50 CEST 2019


Hi everyone,

Since the mandatory else section for case blocks isn't going anywhere, I 
would like to make a small request:

Whenever I come across a section of code in my own projects where "*else 
*;" is necessary, or any empty branch for that matter, I put a "{ Do 
nothing }" comment just to make it absolutely clear that the block is 
there deliberately and so there isn't any confusion with the syntax on 
first viewing; e.g:

*case *... *of*
*else*
     { Do nothing };
*end*;

(I just hope the e-mail formatting doesn't remove the indentation!)

Just a minor thing, but I'm wondering if that's a sensible request for 
the compiler source.

Gareth aka. Kit



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190524/e40e1ea5/attachment.html>


More information about the fpc-devel mailing list