Path: utzoo!attcan!uunet!cs.utexas.edu!samsung!emory!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.lang.c Subject: Re: problems/risks due to programming language Message-ID: <8124@hubcap.clemson.edu> Date: 22 Feb 90 19:41:11 GMT References: <202@puma.ge.com> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 22 From jnixon@andrew.ATL.GE.COM (John F Nixon): >>>> ... C requires use [of] a dangerous construct on a routine basis. >>> Just as Ada requires the use of "exit" to leave the "loop" construct; >>> unless you use Ada'a "goto"... >> Not true; the bare "loop...end loop" is used in situations in which >> the intention is for the loop to execute forever. This arises in >> embedded controllers, operating systems, and similar applications. >> If one is not writing such applications, then "while (Condition) loop" >> and "for Control_Variable in Start..Finish loop" are normally applied. > > Then why provide the exit statement at all? Suppose that one is in a for loop or a while loop, and some unusual situation arises under which processing cannot continue. The exit statement allows one to conveniently handle such cases. > (and where can one obtain the Ada-9X proposals? Simply dial up the Ada 9X bulletin board at (301) 459-8939. Bill Wolfe, wtwolfe@hubcap.clemson.edu