problems/risks due to programming language

William Thomas Wolfe, 2847 billwolf%hazel.cs.clemson.edu at hubcap.clemson.edu
Fri Feb 23 06:41:11 AEST 1990


>From jnixon at 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 at hubcap.clemson.edu



More information about the Comp.lang.c mailing list