Path: utzoo!utgpu!watmath!iuvax!mailrus!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Newsgroups: comp.lang.c Subject: non-contiguous '0' .. '9' Message-ID: <1989Aug30.143212.3987@jarvis.csri.toronto.edu> Date: 30 Aug 89 18:32:12 GMT Organization: Dynamic Graphics Project, University of Toronto Lines: 13 I think the point wrt non-contiguous '0'..'9' is that you don't really gain anything if they're contiguous. Instead of #define val(c) ((c) - '0') you can just use char digits[] = "0123456789"; #define val(c) (strchr(digits, (c)) - digits) and instead of #define str(n) ((n) + '0') you can just use #define str(n) (digits[n]) ajr