Path: utzoo!attcan!uunet!nbires!ncar!boulder!tramp!swarbric From: swarbric@tramp.Colorado.EDU (Frank Swarbrick) Newsgroups: comp.lang.c Subject: Re: enums Message-ID: <2445@boulder.Colorado.EDU> Date: 2 Aug 88 04:04:59 GMT References: <1608@dataio.Data-IO.COM> <469@m3.mfci.UUCP> <1988Jul22.171612.6225@utzoo.uucp> <5447@ihlpf.ATT.COM> <11686@steinmetz.ge.com> <2404@boulder.Colorado.EDU> <5696@haddock.ISC.COM> Sender: news@boulder.Colorado.EDU Reply-To: swarbric@tramp.Colorado.EDU (Frank Swarbrick) Organization: Beautiful Boulder By The Bay Lines: 23 In article <5696@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: }In <2404@boulder.Colorado.EDU> swarbric@tramp (Frank Swarbrick) writes: }>Personally, I would like it to be even a little more like Pascal. [++ on the }>last item should wrap to the first.] This is like Pascal's succ() and pred() } }I rather doubt that this is true of Pascal -- I've never heard of it before -- }but I don't claim to be a Pascal expert, and anyway it doesn't affect my }reply. I *don't* think it should be true of C, because it violates the }principle of keeping the primitives simple. Most applications don't need the }wraparound behavior, and it does have a nontrivial cost, therefore the ++ }operator should simply step by one (with undefined behavior if you step off }the end). Hmm, you seem to be correct that Pascal does not do this, either. I could have sworn that I had used it before, but I just tried it and it does not work. Oh well, now I feel really silly... Frank Swarbrick (and, yes, the net.cat) swarbric@tramp.Colorado.EDU ...!{ncar|nbires}!boulder!tramp!swarbric "You shouldn't kill your brother -- except if he doesn't know what's right. If he can't love your heaven, ahh, it's a mercy for him to die." --Accept