Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!sri-unix!lwa@mit-mrclean.ARPA From: lwa@mit-mrclean.ARPA Newsgroups: net.unix-wizards Subject: more on BCPL and C Message-ID: <1347@sri-arpa.UUCP> Date: Wed, 27-Jun-84 21:51:00 EDT Article-I.D.: sri-arpa.1347 Posted: Wed Jun 27 21:51:00 1984 Date-Received: Sun, 1-Jul-84 03:45:12 EDT Lines: 27 From: Larry Allen 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 { 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...