🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3503

Re: Multi-level break and elimination of GOTO

#3503
From: Andrew Dunbar
Date: Mon, 27 Nov 1995 02:08
31 lines
1354 bytes
Here is one possible solution for the problem with named do loops:

The loop-name should always preceed the parenthesized expression(s)

while loop_name (expression)
	statement;

which means this for do:

do
	statement;
while loop_name (expression);

The loop name at the end does not seem obvious enough but that's where
the expression has always been anyway.

How about these new forms?

do while (expression)
	statement;

do while loop_name (expression)
	statement;

Its probably more logical than the current syntax. It is
grammatically unambiguous and clean. It makes do loops easier to
read whether they are named or not - especially for long do loops.
But is it worth changing the language??

Andrew Dunbar
GPSoftware
Technical Details
Message-ID: <49b6ic$pvl@news.mel.aone.net.au>
Path: arc1-ca.pugleaf.net!news.mel.aone.net.au!not-for-mail
References: <486cj7$o4s@news.mel.aone.net.au> <48bpa2$lmf@news.mel.aone.net.au> <m0tFpAH-000FeXC@eyrie.demon.co.uk> <490b59$3qt@panix.com> <491cb0$7dp@spool.cs.wisc.edu> <6495326.71820.1619@kcbbs.gen.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mel.aone.net.au!not-for-mail
From: andrewd@agnus.livewire.com.au (Andrew Dunbar)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: Multi-level break and elimination of GOTO
Date: 27 Nov 1995 02:08:12 GMT
Organization: Livewire Communications
Message-ID: <49b6ic$pvl@news.mel.aone.net.au>
References: <486cj7$o4s@news.mel.aone.net.au> <48bpa2$lmf@news.mel.aone.net.au> <m0tFpAH-000FeXC@eyrie.demon.co.uk> <490b59$3qt@panix.com> <491cb0$7dp@spool.cs.wisc.edu> <6495326.71820.1619@kcbbs.gen.nz>
NNTP-Posting-Host: agnus.livewire.com.au
X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]