Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!topaz!husc6!seismo!umcp-cs!cvl!umd5.umd.edu!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: net.lang.c,net.lang.pascal Subject: Re: Pascal vs C, again (was: Pascals Origins) Message-ID: <1099@umd5.umd.edu> Date: Tue, 22-Jul-86 19:20:42 EDT Article-I.D.: umd5.1099 Posted: Tue Jul 22 19:20:42 1986 Date-Received: Wed, 23-Jul-86 08:45:38 EDT References: <2222@brl-smoke.ARPA> <7014@boring.mcvax.UUCP> <3130@utcsri.UUCP> <5378@topaz.RUTGERS.EDU> <3142@utcsri.UUCP> Reply-To: zben@umd5.umd.edu.UUCP (Ben Cranston) Organization: University of Maryland, College Park Lines: 32 Xref: watmath net.lang.c:10011 net.lang.pascal:592 Summary: Extended looping construct In article <3142@utcsri.UUCP> greg@utcsri.UUCP (Gregory Smith) writes: > As for the lack of break, it is a fact of life that loops do not always > exit at the same point in the cycle as they start. Pascal ignores this. Over the last ten years I have implemented several (interpretive) languages with the extended repeat syntax: repeat (block 1) until condition (block 2) endrep The idea was to allow the entry point and exit point of the loop to differ without breaking the rule that a loop has only one exit point. repeat fooptr := readnextfoo(foofile) until (fooptr=0) haveyourwaywithfoo(fooptr) endrep In C one would write: while ( 0 != (fooptr = readnextfoo(foofile)) ) haveyourwaywithfoo(fooptr); -- umd5.UUCP <= {seismo!umcp-cs,ihnp4!rlgvax}!cvl!umd5!zben Ben Cranston zben @ umd2.UMD.EDU Kingdom of Merryland Sperrows 1100/92 umd2.BITNET "via HASP with RSCS"