🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #23

Re: semi colons after }

#23
From: Fran Litterio
Date: Sat, 31 Oct 1992 12:35
30 lines
1265 bytes
ark@alice.att.com (Andrew Koenig) writes:

> ddv@unix.brighton.ac.uk (Domenico De Vitto) writes:
> 
> > There is no need to put a semi-colon after a closing brace, it's like putting
> > a remark after every code block for no reason except BAD PRACTICE to do this
> > as no-one else does and it obviously confused (at least) you.
> 
> Indeed, it sometimes incorrect:
> 
> 	if (x < 0) {
> 		x = -x;
> 		sign = 1;
> 	}; else			// syntax error
> 		sign = 0;

And sometimes necessary:

	struct foo {
		int i;
	}			// Need a ';' here.

	sub()
	{
		return 99;
	}
--
franl@centerline.com   || Fran Litterio, CenterLine Software R&D
617-498-3255           || 10 Fawcett St, Cambridge, MA, USA 02138-1110
"It's not the thing you fling, it's the fling itself."  -- Chris Stevens
Technical Details
Message-ID: <FRANL.92Oct31123515@draco.centerline.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.centerline.com!franl
References: <1992Oct19.092858.2877@unix.brighton.ac.uk> <23938@alice.att.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news.centerline.com!franl
From: franl@centerline.com (Fran Litterio)
Newsgroups: comp.std.c++
Subject: Re: semi colons after }
Date: 31 Oct 92 12:35:15
Organization: CenterLine Software, Inc.
Lines: 30
Message-ID: <FRANL.92Oct31123515@draco.centerline.com>
References: <1992Oct19.092858.2877@unix.brighton.ac.uk> <23938@alice.att.com>
NNTP-Posting-Host: 140.239.3.116
In-reply-to: ark@alice.att.com's message of 20 Oct 92 13:33:02 GMT