Article View: comp.lang.modula2
Article #2199Re: DOS compilers
From: Tim Channon
Date: Wed, 16 Dec 1992 03:06
Date: Wed, 16 Dec 1992 03:06
23 lines
1536 bytes
1536 bytes
> : >>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
Technical Details
Message-ID:
<724500364snx@black.demon.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!elroy.jpl.nasa.gov!ames!agate!doc.ic.ac.uk!pipex!demon!black.demon.co.uk!tchannonShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2 From: tchannon@black.demon.co.uk (Tim Channon) Path: arc1-ca.pugleaf.net!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