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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f66d11aeda114c52 X-Google-Attributes: gid103376,public From: "W. Wesley Groleau x4923" Subject: Re: Building blocks (Was: Design By Contract) Date: 1997/09/30 Message-ID: <343149D9.6A30@pseserv3.fw.hac.com>#1/1 X-Deja-AN: 276902300 Sender: usenet@most.fw.hac.com (News Administration) References: <342A0AC6.2F2F@dynamite.com.au> <199709251320.PAA03585@basement.replay.com> <34316EC3.5B62@dynamite.com.au> X-Nntp-Posting-Host: sparc02 Organization: Hughes Defense Communications Newsgroups: comp.lang.ada Date: 1997-09-30T00:00:00+00:00 List-Id: > Yes, it's quite wrong to use a flag to terminate a while loop, > instead of just using exit with a loop. The idiom is, use an > exit when the termination depends on what you read, ..... Or to end a search when the item is found, or ... Unfortunately, there are those who feel that not identifying the loop termination at the beginning of the loop confuses the reader. These folk are supported by a non-thoughtful reading of Ada Quality and Style. The "guidelines" (we all know that's another word for "rules," right?) say to only exit from a plain loop, never from a 'while' or 'for' So folks go through wierd contortions to avoid "exit." But the accompanying explanation clearly says that _readability_ is the criteria for choosing a loop construct. -- ---------------------------------------------------------------------- Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA Senior Software Engineer - AFATDS Tool-smith Wanna-be wwgrol AT pseserv3.fw.hac.com Don't send advertisements to this domain unless asked! All disk space on fw.hac.com hosts belongs to either Hughes Defense Communications or the United States government. Using email to store YOUR advertising on them is trespassing! ----------------------------------------------------------------------