Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!uvaarpa!vger.nsu.edu!g_harrison From: g_harrison@vger.nsu.edu Newsgroups: comp.lang.pascal Subject: Re: Enumeration Inverse- was Request : Help with E Types Message-ID: <369.27671bee@vger.nsu.edu> Date: 13 Dec 90 10:13:02 GMT References: <3983@uniol.UUCP> <1990Dec10.180345.31492@wpi.WPI.EDU> <357.27648291@vger.nsu.edu> <1990Dec13.033609.15385@maverick.ksu.ksu.edu> Lines: 36 In article <1990Dec13.033609.15385@maverick.ksu.ksu.edu>, kincaid@mpccl.ksu.edu (Joe Kincaid) writes: > In article <357.27648291@vger.nsu.edu> g_harrison@vger.nsu.edu writes: >>In article <1990Dec10.180345.31492@wpi.WPI.EDU>, kamal@wpi.WPI.EDU (Kamal Z Zamli) writes: >>> In article <3983@uniol.UUCP> Arne.Gehlhaar@arbi.informatik.uni-oldenburg.de (Arne Gehlhaar) writes: >> [some of my babble deleted] >>We can certainly find the Nth (N = 0...) element in an enumerated type in >>Pascal by searching for it, but are there some tricks (Machine-Dependent or >>otherwise) to provide an inverse to ORD that do not involve searching? >> >>George.... >> > > I usually use typecasting to achieve this. It works in Turbo anyway and > you should probably check to be sure the '0' element lines up where you think > it does. > [Joseph's further stuff deleted] > Joseph Kincaid | All the views contained herein are my own. > kincaid@einstein.mpccl.ksu.edu | Everything else I share with my wife. > KSU - Mathematics Department | Come to think, those are probably hers, too. I sincerely thank all who have replied and followed up on my question about a functional inverse to ORD. The answer was always "typecasting." George...... ------------------------------------------------------*------o Happy--- -- George C. Harrison ------------------------------ * * ----o_o___ New--- ----- Professor of Computer Science -------------- * * * ----\ o /-Year-- ----- Norfolk State University, ----------------- *Merry* ----\ /-------- -------- Norfolk, Virginia 23504 --------------- * * * * * ----|--------- ----- INTERNET: g_harrison@vger.nsu.edu ------ *Christmas* --_|_-------- ----------These are MY views.... you may share them..*** -----------------