Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac,mp.cs.niu.edu!ux1.cso.uiuc.edu!rs6000.cmp.ilstu.edu!ejbehr From: ejbehr@rs6000.cmp.ilstu.edu (Eric Behr) Newsgroups: comp.lang.pascal Subject: Storage efficiency Message-ID: <1991Mar18.222538.5562@rs6000.cmp.ilstu.edu> Date: 18 Mar 91 22:25:38 GMT Reply-To: ejbehr@rs6000.cmp.ilstu.edu (Eric Behr) Organization: Central Illinois Surfing Club Lines: 21 I'm writing a program for rather exotic matrix computations (quick & dirty research tool, nothing useful to an ordinary person). It will have to deal with potentially large matrices (containing structured variables, two longints each), and a lot of them at that. Since I want parts of it to do data preparation which would run on a Mac, I want to make it efficient in terms of storage. Here is the question: what do typical implementations do when a large parameter is passed as a var? does this work exactly like passing a pointer, or does the procedure somehow use more memory that way? Similarly, is there a difference between passing the result (e.g. in a procedure that multiplies two large matrices) as a var parameter, versus having the function return it as a pointer to a matrix? If it matters, I'm using Think Pascal on the Mac and IBM Pascal compiler under AIX. Sorry if this is trivial or confusing - I admit I haven't thought about it too much. Thanks - E. -- Eric Behr, Illinois State University, Mathematics Department Internet: ejbehr@rs6000.cmp.ilstu.edu Bitnet: ebehr@ilstu