Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 (Fortune 01.1b1); site graffiti.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!ut-sally!ut-ngp!shell!graffiti!peter
From: peter@graffiti.UUCP (Peter da Silva)
Newsgroups: net.lang.c
Subject: Re: C Style
Message-ID: <230@graffiti.UUCP>
Date: Mon, 23-Sep-85 07:53:57 EDT
Article-I.D.: graffiti.230
Posted: Mon Sep 23 07:53:57 1985
Date-Received: Wed, 25-Sep-85 03:50:17 EDT
References: <180@chinet.UUCP>
Organization: The Power Elite, Houston, TX
Lines: 22

> versus NO GOTO VERSION
> 
> 	for ( ; (((ch=getch()) < '1' || ch > '5') && ch != 'E') ; )
> 		putchar(BELL);
> 	addch(ch);
> 	refresh();
> 
> My background is predominately from a FORTRAN-BASIC-PL/I
> environment, so I tend to think of the FOR (.;.;.){} in terms
> of DO .. CONTINUE, iterative DO .. END or DO WHILE .. END constructs,
> where this kind of an assignment in the conditional is verboten.

Obviously. A 'C' programmer would have written:

	while( ((ch=getch()) < '1' || ch > '5') && ch != 'E')
		beep();
	addch(ch);
	refresh();

It's considered bad form to have a for loop with more than 1 empty feild.
Now that you're using a construct that doesn't exist in FORTRAN or BASIC
do you feel better?