Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83 based; site hou2h.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!hou2h!mr
From: mr@hou2h.UUCP (M.RINDSBERG)
Newsgroups: net.lang.c
Subject: Re: Use of expression values in C
Message-ID: <978@hou2h.UUCP>
Date: Fri, 12-Jul-85 10:03:38 EDT
Article-I.D.: hou2h.978
Posted: Fri Jul 12 10:03:38 1985
Date-Received: Sat, 13-Jul-85 11:54:09 EDT
References: <474@crystal.UUCP> <397@umcp-cs.UUCP>
Organization: AT&T Bell Labs, Holmdel NJ
Lines: 21

> I must agree with Henry Spencer that readability is not a Boolean type (I doubt
> it's even an ordered type!). However, the question of embedded assignment is 
> not entirely onesided. For some time, I have been using a construct which I
> call a ``guarded command'' (and is indeed something vaguely like Dijkstra's
> guarded commands):
> 
>       if ((fp = fopen(...) != NULL) {
                            ^
			    |--------- Missing close paren.

This one sure is guarded, it wont even compile (>:) .

>          ... Do something; fp does indeed have a value ...
>       }
> 
> The idea is that the if-statement protects the statements of the block. I 
> find this an extremely readable way of stating constraints about the validity
> of variables over sequences of code.

					mark
					..!hou2h!mr