|SUMMARY: Code Generation for Switch Statements firstname.lastname@example.org (1992-05-25)|
|Language standards vary (was Code Generation for Switch Statements) email@example.com (Norman Diamond) (1992-05-27)|
|From:||Norman Diamond <firstname.lastname@example.org>|
|Date:||Wed, 27 May 1992 07:34:27 GMT|
David Spuler quotes Hank Dietz:
>BTW, the C and Pascal constructs are VERY different -- and I'm not just
>talking about the fact that C cases can fall through. Pascal explicitly
>states that values not listed cause undefined behavior, whereas C promises
>that such values cause all cases to be skipped.
The C and Pascal standards are VERY different. Pascal explicity states that
values not listed cause dynamic violations, which MUST be diagnosed by
As a general rule, language standards vary immensely in the amount of error
checking that they require, and in what kind of misbehavior is allowed to
occur. It is advisable to RTFS.
-- Norman Diamond email@example.com
[Aha. So the switch code is really the same, except that in Pascal the
default case always goes to an error routine. -John]
Return to the
Search the comp.compilers archives again.