Article View: comp.lang.misc
Article #1003Re: problems/risks due to programming language, stories requested
From: Joe Keane
Date: Wed, 28 Mar 1990 01:44
Date: Wed, 28 Mar 1990 01:44
32 lines
1171 bytes
1171 bytes
In article <5260@drutx.ATT.COM> rrg@drutx.ATT.COM (GilmanRR) writes:
>switch (type) {
> case A: /* A, etc. are #define'd */
> ... /* do stuff for type A */
> /* FALLTHROUGH */
> case B:
> if (type == B) {
> .... /* do B-only stuff */
> }
> /* FALLTHROUGH */
> case C:
> ... /* do ABC stuff /*
> break;
> default:
> ...
>}
A _real_ C programmer does it this way (try this in Ada):
switch (type)
{
case A:
/* A only stuff */
if (0)
case B:
/* B only stuff */
/* AB stuff */
if (0)
case C:
/* C only stuff */
/* ABC stuff */
}
Technical Details
Message-ID:
<2257@osc.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ames!pacbell!osc!jgkReferences:
<1004@micropen> <8218@hubcap.clemson.edu> <1771@awdprime.UUCP> <879@enea.se> <5260@drutx.ATT.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ames!pacbell!osc!jgk From: jgk@osc.COM (Joe Keane) Newsgroups: comp.lang.misc Subject: Re: problems/risks due to programming language, stories requested Message-ID: <2257@osc.COM> Date: 28 Mar 90 01:44:35 GMT References: <1004@micropen> <8218@hubcap.clemson.edu> <1771@awdprime.UUCP> <879@enea.se> <5260@drutx.ATT.COM> Reply-To: jgk@osc.COM (Joe Keane) Organization: Object Sciences Corp., Menlo Park, CA Lines: 32