CompuServe Messages

#switch()

    17-Dec-91 01:13:34
Sb: #17835-#switch()
Fm: Rob Salmon 71420,471
To: Steve Ahlstrom 76703,2006
Thanks, Khalid was right. My manual said switch() would take scalar constants, which it never defined. I guess I should do a lookup table; I was just being lazy and hoping. strcpy() and strcmp() will do the conversion/comparison but seem to work differently (i.e. require slightly different code) on my usual machines. FWIW, the code compiled just fine and even worked when I was lucky enough to test a single-character case with both Manx and whatever compiler Sun 4.1.1 uses. Khalid, if you're reading this, case 'a': was for Awali 🙂