Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!psuvax1!schwartz From: schwartz@shire.cs.psu.edu (Scott Schwartz) Newsgroups: comp.lang.pascal Subject: Re: Array sizes in Pascal Message-ID: Date: 1 Sep 89 01:34:27 GMT References: <359@s5.Morgan.COM> <731@chyde.uwasa.fi> Sender: news@psuvax1.cs.psu.edu Organization: Pennsylvania State University, computer science Lines: 28 In-reply-to: ts@chyde.uwasa.fi's message of 31 Aug 89 18:43:07 GMT In article <731@chyde.uwasa.fi> ts@chyde.uwasa.fi (Timo Salmi LASK) writes: | There is a neat way around the 64K limitation of (two-dimensional) | arrays published by Kent Porter in Dr.Dobb's Journal, March 1988. | This resolves much of the problem, unless, of cource, you are more | intent on format than on what can be achieved. The point is that deliberately crippling the language in a way that requires resorting to such tricks is a slap in the face of anyone who wants to do serious programming. If you have 640K on the machine, you ought to be able to say: var foo: packed array [0..320000] of char; and be done with it. | Incidentally, the problem does not originate from the Pascal | implementations, but the architecture of the Intel 808x processors. So why not store the variable foo in 5 64K segments and generate code to do the right thing then when the array is accessed? You may not be able to allocate foo on the stack (i.e. as a local variable) but that is wholly different than not being able to allocate it at all (using standard pascal, naturally). Note that you'd still be able to access "foo" through var parameters. -- Scott Schwartz "If it doesn't compile TeX, it isn't Pascal."