[net.unix-wizards] more on BCPL and C

lwa@mit-mrclean.ARPA (06/28/84)

From:  Larry Allen <lwa@mit-mrclean.ARPA>

While we're on the subject of BCPL, I've always missed one of the BCPL
constructs which never found its way into C: the "valof-resultis"
construction.  This allowed any compound statement to return a value
and hence be used in an expression.  As I recall, the basic syntax
was something like:

	variable = valof {
		<statement list>
		resultis (result)
	}

and the statement list could contain declarations, etc.

This construction would be especially useful in conjunction with the
C preprocessor's macro capability, as it would allow one to build
macros with their own local variables and with moderately sophisticated
control structure.  One difficulty with imlementing it in C is that
the type of the result needs to be declared somewhere (not a problem
in BCPL!)

Any comments?
					-Larry Allen

PS. This is probably not the appropriate newsgroup for this, but from the
Internet it's the only one I get, so...