From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 2 Mar 93 07:33:45 GMT From: agate!spool.mu.edu!caen!sol.ctr.columbia.edu!ira.uka.de!news.dfn.de!tubsi br!postnntp@ucbvax.Berkeley.EDU (Andreas Hestermeyer) Subject: Re: Grouping data from different modules together Message-ID: <1993Mar2.073345.29349@ibr.cs.tu-bs.de> List-Id: In article <1993Mar1.171045.17020@wdl.loral.com> mab@wdl1.wdl.loral.com (Mark A Biggar) writes: >In article <1993Mar1.153217.3290@ibr.cs.tu-bs.de> hestermeyer@ida.ing.tu-bs.de (Andreas Hestermeyer) writes: >> So far for the basic concept. To be efficient, all items of a group >>should be allocated an undivided space in memory. It is usually very >>easy to define such GROUPS in assembler language and have the linker >>taking care of grouping the data together. So each data item can be defined >>in the source code file of the module it belongs to. No extra source >>file, where all data items of a group would be defined together, is >>needed and this serves the aspects of modularization and independance >>very well. >> Is there any language construct in C,C++,PASCAL,Modula or ADA to >>support such data groups ? >> I haven't found any. If not : why didn't anybody invent such things ? > >There is a standard way to do this in all the above languages. It is called >the record stucture. It is the standard way to group related data items >together. This deos require that all the related data items be defined >in the same file, but if they are related enough to be grouped together, then >they are related enough to be defined together. > >-- >Mark Biggar >mab@wdl1.wdl.loral.com > > I disagree. This leads to a situtation where, if you exchange one module with another, you would have to change (at least) to files. This really isn't necess ary. One should think of a portable way to implement this. Andreas Hestermeyer