From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 15 Dec 92 17:35:05 GMT From: agate!spool.mu.edu!hri.com!noc.near.net!inmet!ryer@ucbvax.Berkeley.EDU ( Mike Ryer) Subject: Multi-way Case Statement Message-ID: <1992Dec15.173505.11693@inmet.camb.inmet.com> List-Id: Here's another way to get the affect of multi-way case: type Three_Cases is (F_F_F, F_F_T, F_T_F, F_T_T, T_F_F, T_F_T, T_T_F, T_T_T); Truth_Table: constant array (Boolean, Boolean, Boolean) of Three_Cases := (((F_F_F, F_F_T), (F_T_F, F_T_T)), ((T_F_F, T_F_T), (T_T_F, T_T_T))); begin . . . case Truth_Table(a>b, c/=d, e ... when T_T_F | T_F_F => ... when T_T_T => ... when others => ... end case; Once you set up the two top declarations, you can code as many 3-way case statements as you like, without repeating them. I suspect that the ultimate generated code is the same as what you would get if it were a built-in language feature. Mike Ryer Intermetrics