home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.modula2
- From: tchannon@black.demon.co.uk (Tim Channon)
- 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
- Subject: Re: DOS compilers
- Reply-To: tchannon@black.demon.co.uk
- Distribution: world
- X-Mailer: cppnews $Revision: 1.20 $
- Organization: null
- Lines: 23
- Date: Wed, 16 Dec 1992 03:06:04 +0000
- Message-ID: <724500364snx@black.demon.co.uk>
- Sender: usenet@demon.co.uk
-
- > : >>I need a DOS Modula-2 compiler that will pack subranges, for example,
- > : >>[0..255] would be stored in 1 BYTE. The compiler that I ues store it as
- > :
- > : Problem is I'm doing cross platform development and my code already takes
- > : advantage of subrange packing on the Mac side.
- >
- > Most DOS compilers should -- for one I know that the TopSpeed
- > compilers pack all data types into the smallest possible memory. You
-
- I checked when I saw the posting and JPI V3.02 does not seem to pack CARDINALs
- which have a subrange of <= 255
- It does pack BITSET and this is very useful for sets of flags, particularly
- when the underlying data has to exactly match a binary file.
-
- Personally I am nervous about relying on particular optimisations used by a
- compiler because of just this sort of problem.
-
- Maintenance might be easier if an explicit cast is used at some point instead
- of a completely hidden side effect?
-
- TC.
- E-mail: tchannon@black.demon.co.uk or tchannon@cix.compulink.co.uk
- nu.c
-