Path: utzoo!mnetor!uunet!husc6!mailrus!ames!pasteur!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Goin' Crazy on a Mac, or, How I Love MPW "GlobalData" Message-ID: <23952@ucbvax.BERKELEY.EDU> Date: 7 May 88 18:03:24 GMT References: <8816@eleazar.Dartmouth.EDU> <7327@drutx.ATT.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 18 In article <7327@drutx.ATT.COM> clive@drutx.ATT.COM (Clive Steward) writes: >for this. In particular, the very useful program generators yacc and >lex generate data arrays, which are used for finite state machines. So, write the data arrays to a resource using a tool. Then in your actual program, just as you init your unitinitialized arrays with NewPtr, you init your initialized arrays with: fooarray = (FooArrayType) * GetResource('GNRL', 128); Simple, no? just make the resource purgable and locked, and this gives you now problem. Sure it is a pain that the compiler didn't do it for you, but when the workaround takes one line, why bitch? Copyright (c) 1988 by David Phillip Oster, All Rights Reserved --- David Phillip Oster --When you asked me to live in sin with you Arpa: oster@dewey.soe.berkeley.edu --I didn't know you meant sloth. Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu