Path: utzoo!attcan!uunet!yale!root From: root@yale.UUCP (Celray Stalk) Newsgroups: comp.sys.atari.st Subject: Re: Personal Pascal question Message-ID: <36239@yale-celray.yale.UUCP> Date: 23 Aug 88 15:05:11 GMT References: <8808230057.AA13653@ucbvax.Berkeley.EDU> Reply-To: fischer-michael@CS.YALE.EDU (Michael Fischer) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 29 In article <8808230057.AA13653@ucbvax.Berkeley.EDU> MCCABE@MTUS5.BITNET writes: >Subject: Personal Pascal question > ... > Too many external references > ... >Does anyone have any ideas on this? Two things to look at: 1. The +E compiler switch, if I remember correctly, causes ALL global symbols to become external. I think it is on by default. Since you have so many global symbols, you might want to try turning it off and explicitly declaring just those you need. 2. You can get by with only one global variable by defining a record with 97 fields and having one global variable of that record type. But a much better style is to organize them into related groups of variables, and to make each group a structure with an associated global variable of that type. This should make the program much cleaner and easier to maintain. Having done so, you might then decide that it is no longer so onerous passing around these structures as VAR parameters and get rid of the global variables altogether! ================================================== | Michael Fischer | | Arpanet: | | Bitnet: | | UUCP: | ==================================================