[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] enumerations?



On Jul 20, 2005, at 3:55 PM, John wrote:

there has been alot of talk about enumerations on this page.My problems is this..what are enumerations to begin with?I've only been programming for a short time, and a definition or a place to get a good definition would be very helpful.

From <http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?enum>
<programming> (Or "enumeration") A type which includes in its definition an exhaustive list of possible values for variables of that type. Common examples include Boolean, which takes values from the list [true, false], and day-of-week which takes values [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]. Enumerated types are a feature of strongly typed languages, including C and Ada.


Characters, (fixed-size) integers and even floating-point types could be (but are not usually) considered to be (large) enumerated types.



-bob