Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!purdue!bu-cs!encore!xenna.UUCP From: soper@xenna.UUCP (Pete Soper,,,) Newsgroups: comp.lang.modula2 Subject: Re: type conversion question Message-ID: <7454@xenna.Encore.COM> Date: 1 Jun 89 15:32:40 GMT References: <2027@csuna.csun.edu> Sender: news@Encore.COM Lines: 12 From article <2027@csuna.csun.edu>, by abcscagz@csuna.csun.edu (Jeff Boeing): > and read from a file. If x is of my enumerated type, it's easy enough to save > it to a file by saying "WriteInt (ORD(x))" (after redirecting output, of > course), but how do I read that value back in? Read the ordinal and use it as an index to an array whose elements contain the corresponding enumeration values. It is tiresome but portable since you are the one doing the mapping. ---------------------------------------------------------------------- Pete Soper +1 919 481 3730 arpa: soper@encore.com uucp: {bu-cs,decvax,necntc}!encore!soper Encore Computer Corp, 901 Kildaire Farm Rd, bldg D, Cary, NC 27511 USA