Article View: comp.lang.modula2
Article #2544Re: Modula-2, Modula-3, C or C++
From: Rodney M. Bates
Date: Wed, 27 Sep 1995 14:07
Date: Wed, 27 Sep 1995 14:07
17 lines
1370 bytes
1370 bytes
Even for uses entirely internal to a single program, I don't think an integer type whose size varies from one implementation to another is very useful. I want my program to do the same thing when ported. In theory, changes in the size of an integer only change the size of problem it can handle. In practice, a change from 32 to 16 often means the difference between a program which can handle a problem of any remotely realistic size and a program which can only handle nearly trivial examples. I usually use a module/package/interface/header file named PortTypes, containing declarations for types like Integer16, Integer32, etc. Then I use these in the application. If I port, I can just change the declarations in PortTypes. With this in place, it is very rare that I actually want a type that changes size. Rodney Bates
Technical Details
Message-ID:
<DFKHwA.68y@bcsaic.boeing.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bcstec!bcsaic!rodneyReferences:
<438nkr$bd@classic.eng.octel.com> <BLUME.95Sep20162845@atomic.cs.princeton.edu> <DF993v.GI4@cix.compulink.co.uk> <DF9zLI.43E@avalon.chinalake.navy.mil>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++ Path: arc1-ca.pugleaf.net!in1.uu.net!bcstec!bcsaic!rodney From: rodney@bcsaic.boeing.com (Rodney M. Bates) Subject: Re: Modula-2, Modula-3, C or C++ Message-ID: <DFKHwA.68y@bcsaic.boeing.com> Sender: Rodney Bates Organization: Boeing Computer Services References: <438nkr$bd@classic.eng.octel.com> <BLUME.95Sep20162845@atomic.cs.princeton.edu> <DF993v.GI4@cix.compulink.co.uk> <DF9zLI.43E@avalon.chinalake.navy.mil> Date: Wed, 27 Sep 1995 14:07:22 GMT