enums
bill
bill at zycor.UUCP
Sat Aug 6 00:42:22 AEST 1988
}In <2404 at boulder.Colorado.EDU> swarbric at tramp (Frank Swarbrick) writes:
}>In <11686 at steinmetz.ge.com> davidsen at crdos1.UUCP (bill davidsen) writes:
}>>[enums should be in sequence, so ++ and -- can be used meaningfully]
}>
}>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 --
In pascal, doing a succ() on the last item in an enum is a runtime error.
In pascal, doing a pred() on the first item ...
If your's wraps, it's broken. (Or maybe it's from Borland :-) )
More information about the Comp.lang.c
mailing list