Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!usna!baldwin From: baldwin@usna.MIL (J.D. Baldwin) Newsgroups: comp.lang.pascal Subject: Another various question about TP 5.0 Message-ID: <303@usna.MIL> Date: 30 Nov 89 16:21:16 GMT Reply-To: baldwin@cad.usna.mil (J.D. Baldwin) Organization: Canoe U. Lines: 22 Is there a good, clean way to convert the value of an enumerated ordinal type to a string value? That is, what does the function ConverterFunction(somevalue:sometype) : string look like in this fragment: type veggies = (carrots, limabeans, beets, toadstools); . . . var whatveg : veggies; . . . whatveg := carrots; . . . writeln(ConverterFunction(whatveg)); so that the writeln statement will output the string "carrots"? This question is not exactly mission-critical to me, but an answer would be nice. If replies are by e-mail, I'll summarize. -- From the catapult of: |+| "If anyone disagrees with anything I _, J. D. Baldwin, Comp Sci Dept |+| say, I am quite prepared not only to __||____..}-> US Naval Academy |+| retract it, but also to deny under \ / baldwin@cad.usna.navy.mil |+| oath that I ever said it." --T. Lehrer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~