Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site jenny.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!ukc!kcl-cs!jenny!jbdp From: jbdp@jenny.UUCP (Julian Pardoe) Newsgroups: net.lang Subject: Re(3): Varieties of conditional statement Message-ID: <271@jenny.UUCP> Date: Fri, 18-Oct-85 20:33:40 EDT Article-I.D.: jenny.271 Posted: Fri Oct 18 20:33:40 1985 Date-Received: Wed, 23-Oct-85 04:56:16 EDT Organization: U of Cambridge Comp Lab, UK Lines: 39 Xpath: kcl-cs neon > > Syntactically, there's no reason why we couldn't have something like: > > IF c THEN DECLARE a : INTEGER; ... ENDIF > > As, in fact, you do in Algol68. > > IF c THEN INT a; ... FI In fact you can do more than that: IF INT x; read (x); x < 0 THEN ...x... ELSE ...x... FI and there is of course the all-purpose WHILE loop: C Loop Type A68 Equivalent =========== ============== while (e) do s; WHILE e DO s OD do s while (e); WHILE s; e DO SKIP OD; for (;;) { WHILE s1; e DO s2 OD; s1; if (e) break; s2; } Algol-68: love its syntax (except unlabelled CASEs), hate its semantics... (especially MODEs) Julian Pardoe ------------- University of Cambridge Tel: +44 223 352435 ext. 265 Computer Laboratory Arpa: <@ucl-cs: jbdp@cl.cam.ac.uk> Corn Exchange Street Janet: jbdp@UK.AC.Cam.CL CAMBRIDGE, CB2 3QG UUCP: mcvax!ukc!cl-jenny!jbdp Great Britain