enums

Frank Swarbrick swarbric at tramp.Colorado.EDU
Tue Aug 2 14:04:59 AEST 1988


In article <5696 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) writes:
}In <2404 at boulder.Colorado.EDU> swarbric at 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 at 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



More information about the Comp.lang.c mailing list