home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / modula2 / 1574 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.lang.modula2
  2. From: tchannon@black.demon.co.uk (Tim Channon)
  3. Path: sparky!uunet!pmafire!news.dell.com!swrinde!elroy.jpl.nasa.gov!ames!agate!doc.ic.ac.uk!pipex!demon!black.demon.co.uk!tchannon
  4. Subject: Re: DOS compilers
  5. Reply-To: tchannon@black.demon.co.uk
  6. Distribution: world
  7. X-Mailer: cppnews $Revision: 1.20 $
  8. Organization: null
  9. Lines: 23
  10. Date: Wed, 16 Dec 1992 03:06:04 +0000
  11. Message-ID: <724500364snx@black.demon.co.uk>
  12. Sender: usenet@demon.co.uk
  13.  
  14. > : >>I need a DOS Modula-2 compiler that will pack subranges, for example,
  15. > : >>[0..255] would be stored in 1 BYTE.  The compiler that I ues store it as
  16. > : 
  17. > : Problem is I'm doing cross platform development and my code already takes
  18. > : advantage of subrange packing on the Mac side.
  19. > Most DOS compilers should -- for one I know that the TopSpeed
  20. > compilers pack all data types into the smallest possible memory.  You
  21.  
  22. I checked when I saw the posting and JPI V3.02 does not seem to pack CARDINALs
  23. which have a subrange of <= 255
  24. It does pack BITSET and this is very useful for sets of flags, particularly
  25. when the underlying data has to exactly match a binary file.
  26.  
  27. Personally I am nervous about relying on particular optimisations used by a
  28. compiler because of just this sort of problem.
  29.  
  30. Maintenance might be easier if an explicit cast is used at some point instead
  31. of a completely hidden side effect?
  32.  
  33.   TC. 
  34.     E-mail: tchannon@black.demon.co.uk or tchannon@cix.compulink.co.uk
  35.                                 nu.c
  36.