Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!umix!rutgers!bellcore!tness7!tness1!nuchat!sugar!schaub From: schaub@sugar.UUCP (Markus Schaub) Newsgroups: comp.lang.modula2 Subject: Re: M2: A software development approach Message-ID: <1783@sugar.UUCP> Date: 31 Mar 88 02:15:19 GMT References: <8803251846.AA11539@klaus.olsen.uucp> Organization: Sugar Land UNIX - Houston, TX Lines: 27 Robert Nagler writes: I fully agree to your comments on the given fragments. There is just one thing I'd like to add. > of 32. Second, CHR is used instead of the type coercion CHAR. There > is a subtle but critical difference between the two. When I compiled If you check with Wirth's latest compiler (well I'm away from ETH for a year now, I hope it's still true) you'll see that type coercions have changed. Coercions now use VAL(CHAR,card) and VAL has to be imported from SYSTEM. The reason: All machine dependent things should be imported from SYSTEM to make porting possible. If your program uses CARDINAL(address) this might cause problems on an other computer etc. and they are hard to find. M2Amiga didn't follow this trend completely. We agree more with a draft of the BSI standard that replaces CHR/ORD etc by CHAR/INTEGER/CARDINAL and defines these as 'thinking' type conversions. If you want the old coercion in M2Amiga you have to use CAST(type,val). Heb e schoene, uff e anders Mool -- // Markus Schaub | The Modula-2 People: // M2Amiga Developer | Interface Technologies Corp. \\ // uunet!nuchat!sugar!schaub | 3336 Richmond Ave. Suite 323 \X/ (713) 523-8422 | Houston, TX 77098