Path: utzoo!attcan!uunet!husc6!bloom-beacon!think!ames!pasteur!ucbvax!unizh.UUCP!nagler%olsen From: nagler%olsen@unizh.UUCP (Robert Nagler) Newsgroups: comp.lang.modula2 Subject: Re: more about ORD and VAL Message-ID: <8806300811.AA00246@klaus.olsen.uucp> Date: 30 Jun 88 08:11:32 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Info-Modula2 Distribution List Organization: The Internet Lines: 20 Why not define ORD(aValueOfIntType) to be CARDINAL(aValueOfIntType)? That is, a meaning-preserving coercion into type CARDINAL? That way, you could just get rid of ORD altogether! Pardon me, but what does the term "meaning-preserving coercion" denote? As far as I understand type coercions in other languages, I believe the current semantics are "meaning-preserving", that is, they preserve the meaning of the memory and that is all. You cannot get rid of ORD, because it returns the "ordinal" value in terms of a type CARDINAL. The type conversion CARDINAL merely subverts the type checking mechanism. I know that I am a bad boy, but sometimes I need to do things like: bitset := BITSET( CARDINAL( bitset ) DIV 100H ); This is quite a useful operation in certain types of system programming. Rob PS. I've been wondering what would happen if all this talk about designing Modula-2-rev-Q were translated into energy which could be used to develop a portable public domain language environment.