From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b865518fde7413cd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-02 10:26:11 PST Newsgroups: comp.lang.ada Path: sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!yale.edu!newsserver.jvnc.net!howland.reston.ans.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Subject: Re: Grouping data from different modules together Message-ID: <1993Mar1.141751.17670@sei.cmu.edu> Sender: netnews@sei.cmu.edu (Netnews) Organization: Software Engineering Institute References: <1993Mar1.153217.3290@ibr.cs.tu-bs.de> <1993Mar1.171045.17020@wdl.loral.com> Date: Mon, 1 Mar 1993 14:17:51 EST Date: 1993-03-01T14:17:51-05:00 List-Id: In article <1993Mar1.171045.17020@wdl.loral.com> mab@wdl1.wdl.loral.com (Mark A Biggar) writes: >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. I'm sorry, but I don't believe that. Let me give a simple example from the ugly past, which I'm quite prepared to believe applies also to the ugly present. The program was a transaction-processing executive, whose purpose was to allow multiple "simultaneous" transactions, with different priorities, to be processed by a single application. This was before the days of re-entrant code, and of course you couldn't run an application end-to-end without frequent pauses to poll for interrupts, acknowledge high-priority events, and so on. The application was therefore structured as a sequence of small serially reusable procedures, and the executive, or "driver" had this basic structure for i over fragment do execute(fragment[i]) poll for anything urgent end The table of code fragments had to be linear in memory, and of course was constructed by the linker. After all, when we were maintaining the application - several hundred KLOC, a lotta code in those days - and we changed a fragment, and it now ran for too long, we broke it in half, and surely did *not* want to have to recompile the world after such a change. It seems to me that this is close to the problem the original poster had, and I for one don't think that fragment array is a global data structure visible at the source language level. And no, I don't know of any modern high-level language that lets you do this - certainly not Ada, which can't even build a table of procedure addresses at all, global or otherwise.