Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!um-math!sharkey!shadooby!accuvax.nwu.edu!tank!uxc!iuvax!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.c Subject: Re: Optional semi-colons Summary: Why not do it the way it has to be done in #defines? Message-ID: <1273@l.cc.purdue.edu> Date: 1 May 89 13:51:39 GMT References: <41117@oliveb.olivetti.com> <225800165@uxe.cso.uiuc.edu> Organization: Purdue University Statistics Department Lines: 24 In article <225800165@uxe.cso.uiuc.edu>, mcdonald@uxe.cso.uiuc.edu writes: > > > >For example, the C preprocessor. Having a unique statement terminator frees > >the programmer of worrying where newlines might show up after macro expansion. > > Really? What happens if macro expansion results in a string longer > than 509 characters, or an expression several thousands of bytes long? > I have had both of those happen. Serious worries result. > In C, there is already a situation in which semicolons are not used for terminators, newlines are, and there is provision for multiple line statements. This is in #defines, where semicolons frequently occur. It is necessary to escape a newline to prevent termination. Why not do this in the language? It handles the situation of multi-line statements without requiring a statement termination character. One could still allow semicolons to end statements, so existing code could be reasonably edited. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)