Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!ted From: ted@cs.utexas.edu (Ted Woodward) Newsgroups: comp.sys.mac.programmer Subject: global data in Think C Message-ID: <704@dimebox.cs.utexas.edu> Date: 6 May 90 20:53:48 GMT Organization: U. Texas CS Dept., Austin, Texas Lines: 29 Well, I just found out that string constants in Think C 4.0 get put into the global data segment...bad move, guys. Because of this, I have 47K of 'global' data... So what do I try? I try this: #define NUMELEMS 29 Str32 *myArray; /*yes, I did a #include */ InitElms() { myArray = (Str32 *) NewPtr(sizeof(Str32) * (long) NUMELMS); myArray[0] = "generic text here"; } and get 'illegal operation on array'. So I can't say: Str32 test; test = "stuff"; ? This seems kinda silly. I'd also like to be able to say something like this: myArray = {"generic1","genereic2",...} like in a declaration, so I can put the stuff in the heap instead of global space... -- Ted Woodward (ted@cs.utexas.edu) Someone shot the food...