Path: utzoo!utgpu!attcan!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.misc Subject: Re: Expression Based Language Message-ID: <2659@ficc.uu.net> Date: 7 Jan 89 00:23:13 GMT References: <3300001@uxg.cso.uiuc.edu> <3290002@hpctdls.HP.COM> <11359@haddock.ima.isc.com> Organization: Xenix Support Lines: 41 Three comments: First, a = for(s1;e;s2) Is this legal? If e fails, is the value s1? also, [BCPL resultis...] This is equivalent to your 'break(n)', above. I like this very much. I didn't do anything like 'resultis', and had break return the value of the preceding expression. and finally, For expressions like if-without-else, the value if no statement was executed was zero, NULL, whatever. This was in analogy to short-circuit AND (which wasn't in the language). That is, "a = if(b) then 2" was equivalent to "a = b || 2". This also obviated the need for flow analysis, and let me just use the value in BC as the result of a statement :->. ... OK. I think the name "E" is better than "EC". (I called mine "Small-P :->"). How about making break(n) work in any block? Hmmm. No. Hmmm. Maybe resultis would be better. Simplify it, make it 'result'. I think the value of a statement with varying types is soluble by looking at the coercion needed to use it in context. If function prototypes are mandated, the only problem is printf(). And I think the promotion rules will work here. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Work: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. `-_-' Home: bigtex!texbell!sugar!peter, peter@sugar.uu.net. 'U` Opinions may not represent the policies of FICC or the Xenix Support group.