Xref: utzoo comp.lang.pascal:1796 comp.sys.mac.programmer:6071 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!rutgers!joyce!gds From: gds@spam.istc.sri.com (Greg Skinner) Newsgroups: comp.lang.pascal,comp.sys.mac.programmer Subject: Re: THINK Pascal for Macs problem Message-ID: <20425@joyce.istc.sri.com> Date: 7 May 89 14:58:48 GMT References: <20120@joyce.istc.sri.com> Sender: news@joyce.istc.sri.com Reply-To: gds@spam.istc.sri.com (Greg Skinner) Organization: SRI International, Menlo Park CA Lines: 27 I wanted to thank everyone for their help. There were a few questions about some specific code I wrote, namely: > begin > B := vechandle(NewHandle(k * sizeof(integer))); > C := vechandle(NewHandle(k * sizeof(integer))); > [...] > (* code to free space for B and C goes here *) > end; I did not want to allocate space for the whole array, which was 10000 locations, because that would have run my machine out of memory. (This block is in a recursive call.) Instead, I only wished to allocate space for as much as I needed for an array of that type. Thus, the "k". Since I am a C programmer, I am used to dealing with pointers and allocating as much space as I need, rather than allocating all the space that is declared for a variable of that type. This is probably not such a good way to do things, as the Pascal compiler may not allow you to allocate space in that manner. (I don't know -- this is one of my problems, dealing with a nonstandard compiler in a language and programming environment I am not comfortable with.) Thanks for all your help, anyway. --gregbo