Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!gvlf3.gvl.unisys.com!tredysvr!cellar!rogue From: rogue@cellar.UUCP (Rogue Winter) Newsgroups: comp.lang.c Subject: Grouse: What's the point of enum? Message-ID: Date: 18 Apr 91 04:26:15 GMT Sender: bbs@cellar.UUCP (The Cellar BBS) Organization: The Cellar BBS and public access system Lines: 20 When I wanted to start learning C, I expected enumerated types to be very useful in combination with the increment and decrement operators. I hoped to be able to use printf(...%s...) to show the named value I'd given a constant. Neither experiment had the desired effect. I'm sure you all know the results of such operations involved. The point is, if increment operators on enumerated variables don't produce increments of the defined values in the enum statement (and enumerated variables are capable of having values not included in the explicit declarations), why bother declarig values for them? If the names given to enumerated values cannot be printed, why do they exist? The only purpose I can see is that they become local symbolic constants. Forgive a young novice her screed, but this just don't seem kosher. Rogue Winter : "How can you say I only protected people in South rogue@cellar.uucp : Philadelphia? I protected people all over this city; it uunet!cellar!rogue: didn't matter if they were in South Philadelphia or Cellar 215/3369503: Northeast Philadelphia." -- Frank Rizzo, 4/12/91