home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / modula2 / 1636 < prev    next >
Encoding:
Text File  |  1993-01-11  |  878 b   |  26 lines

  1. Newsgroups: comp.lang.modula2
  2. Path: sparky!uunet!munnari.oz.au!metro!seagoon.newcastle.edu.au!wombat.newcastle.edu.au!eepjm
  3. From: eepjm@wombat.newcastle.edu.au (Peter Moylan)
  4. Subject: Re: Generic stack implementation
  5. Message-ID: <1993Jan11.171245.1@wombat.newcastle.edu.au>
  6. Lines: 14
  7. Sender: news@seagoon.newcastle.edu.au
  8. Organization: University of Newcastle, AUSTRALIA
  9. References: <36764.2B50C7C5@puddle.fidonet.org>
  10. Date: Mon, 11 Jan 1993 06:12:45 GMT
  11.  
  12. In article <36764.2B50C7C5@puddle.fidonet.org>, Robert.Barton@p0.f6.n105.z1.fidonet.org (Robert Barton) writes:
  13. >   Why is type-casting non-portable?
  14.  
  15. Try this:
  16.     VAR c: CARDINAL;  p: POINTER TO something;
  17.     ...
  18.     c := CARDINAL(p);
  19.  
  20. It will work on machines for which a CARDINAL and a POINTER take the
  21. same amount of memory, but not on others.
  22.  
  23. -- 
  24. Peter Moylan                      eepjm@wombat.newcastle.edu.au
  25.