From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,f66d11aeda114c52 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,f66d11aeda114c52 X-Google-Attributes: gid103376,public From: Stephen Leake Subject: Re: Building blocks (Was: Design By Contract) Date: 1997/09/30 Message-ID: <34316887.1BD4@gsfc.nasa.gov>#1/1 X-Deja-AN: 276853521 References: <342A0AC6.2F2F@dynamite.com.au> <199709251320.PAA03585@basement.replay.com> <34316EC3.5B62@dynamite.com.au> <01bccdb8$29f54e30$4c18c90a@ntwneil> Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Reply-To: Stephen.Leake@gsfc.nasa.gov Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-30T00:00:00+00:00 List-Id: Neil Wilson wrote: > [SNIP] > > > > > loop > > > > Read (N); > > exit when N = 0; > > > > > > > > end loop; > > This can be fixed by using a 'half unroll'. Eiffel supports this: why does it need to be "fixed"? what's wrong with it? > loop > file.read_integer > while file.last_integer != 0 > x.process (file.last_integer) > file.read_integer > end -- loop Yech. Where does control transfer back to when end is reached? to 'loop' or to 'while'? I'll take the Ada any day. Perhaps Eiffel does not have "exit" > > -- > Neil Wilson (neil at aldur dot demon dot co dot uk) > Aldur Systems Ltd, UK -- - Stephe