Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!MTUS5.BITNET!MCCABE From: MCCABE@MTUS5.BITNET Newsgroups: comp.sys.atari.st Subject: Personal Pascal question Message-ID: <8808230057.AA13653@ucbvax.Berkeley.EDU> Date: 22 Aug 88 17:56:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 58 Date: 22 August 1988, 12:36:14 EST From: Jim McCabe MCCABE at MTUS5 To: INFO-ATARI16 at SCORE.STANFORD.EDU Subject: Personal Pascal question This is directed to people who really know a lot about Personal Pascal, or those who have written huge programs in it. Today, while rewriting the editor in a BBS of mine, my source code stopped compiling. The compiler gets to the last line of the file ("end."), and stops with the error Too many external references So, I looked through my entire Personal Pascal manual for some information about just what the limit IS for external references, and it doesn't say anything about them. Here's my situation: I have declared: 305 constants, plus those in GEMCONST.PAS (I use a very large resource file) 28 types, plus GEMTYPE.PAS 97 global variables (I *have* to use them, or else each procedure would have huge parameter lists -- believe me on this...) containing: 6 file variables 17 dialog box pointers (Dialog_Ptr) 1 menu pointer (Menu_Ptr) 8 external functions or procedures, all global 15 TOS function declarations, all global 6 pointer variables, all local to one procedure Now the weird thing is, I have had the 8 EXTERNAL routines and the 15 TOS routines declared for months, and it's always taken them until today when I changed my editor so that it uses pointers instead of a big array. The editor routine even compiles beautifully, and the error pops up on the last line of the main program. Has anyone else experienced this error? What *is* the limit on external references? (By the way, I'm using version 1.x, NOT one of the newer version 2.x compilers...) I'm going to make the file variables local, since those use pointers too, but still, the error doesn't make sense. I don't think Personal Pascal handles external referrences well in the first place. For one thing, when I try to link together a few really large modules, the compiler always "forgets" to link a couple of the files (seems random), and it also screws up some of its own internal variables. For instance, it will give me a linking error, saying that the function "bssanf" is undeclared. My program doesn't use any function bssanf. :) Does anyone have any ideas on this? Maybe the new version of the compiler works better, who knows. Jim McCabe MCCABE @ MTUS5.BITNET