🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2274

Re: Evil C Contests

#2274
From: Joern Rennecke
Date: Thu, 14 Mar 1996 02:20
17 lines
999 bytes
stanr@tiac.net (Stan Ryckman) writes:
...
>Perhaps this should be merged with the (IMHO rather silly) thread on
>using or not using break within loops.

>	for ( i = 0 ; ; i ++ ) {
>	    /* stuff */
>	    if ( i == UCHAR_MAX )
>		break;
>	    }

>fits the bill just fine.  And now we don't even have to try and figure
>out whether i overflowing causes undefined behaviour or not.

What for? Use a do-while loop.

	Joern Rennecke
Technical Details
Message-ID: <4i7vq7$43g@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4fu7pp$94q@solutions.solon.com> <4gfaki$1uc@solutions.solon.com> <4ghnp2$djn@solutions.solon.com> <4h75a2$4l6@solutions.solon.com> <4hdqoe$8rl@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: amylaar@meolyon.hanse.de (Joern Rennecke)
Newsgroups: comp.lang.c.moderated
Subject: Re: Evil C Contests
Date: 13 Mar 1996 20:20:55 -0600
Organization: Private site running Linux
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4i7vq7$43g@solutions.solon.com>
References: <4fu7pp$94q@solutions.solon.com> <4gfaki$1uc@solutions.solon.com> <4ghnp2$djn@solutions.solon.com> <4h75a2$4l6@solutions.solon.com> <4hdqoe$8rl@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com