Article View: comp.lang.modula2
Article #4852Re: type conversion question
From: Pete Soper,,,
Date: Thu, 01 Jun 1989 15:32
Date: Thu, 01 Jun 1989 15:32
12 lines
1103 bytes
1103 bytes
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
Technical Details
Message-ID:
<7454@xenna.Encore.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!purdue!bu-cs!encore!xenna.UUCPReferences:
<2027@csuna.csun.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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