problems/risks due to programming language

Scott E. Schwartz schwartz at barad-dur.endor.cs.psu.edu
Sat Feb 24 08:36:57 AEST 1990


In article <BITBUG.90Feb22221658 at lonewolf.sun.com> James Buster writes:
>I claim that the possibly erroneous replication of code required by the Ada
>case statement, e.g.
>-- in approximate Ada style
>switch foo is
>    case 5 =>
>	statement1; statement2; statement3;
>    case 7 =>
>	statement1; statement2; statement3;
>end

Ada programmers would write this as:

  case foo is
    when 5 | 7 => statemen1; statement2; statement3;
  end case;

Next strawman?

--
Scott Schwartz		schwartz at cs.psu.edu
"the same idea is applied today in the use of slide rules." -- Don Knuth 



More information about the Comp.lang.c mailing list