CompuServe Messages

Question on ARRAYs

    15-Jun-90 20:16:35
Fm: Steven D. Kapplin 70055,1021
To: Art Steinmetz 76044,3204
Art, In theory it will work, of course. But the programming to do it becomes a bit horny. I guess I know now why most stat programs written in Pascal or Modula generally use a disk virtual file, so it can page 32K into and out of memory! I checked through my Lattice docs and it stated that there was no limit on the size of an array in C other than that imposed by memory, data, and storage type. However, I checked in some books on Modula and apparently the 32K limit isn't uncommon to those language implementations. I can't imagine why 'ol what's his name would have created a language and imposed such an unnecessary limitation. I understand the limitation on module size, but that certainly poses no serious limitation on program implementation since it's highly unlikely that one needs to write a single code module greater than 32K in even the largest program. As I think of it, tho, I remember a number of Basic implementations which had 32K limits on such things as max string length and code size, but I think most of those were implementations with their origins in CP/M. I guess that the practical solution is to page 32K of data into memory at a time, then page it back out to disk. That is no more complicated than the pointer solution and has the added feature of allowing a datafile size limited only by disk storage. That way one could, in theory, have a data file of extremely large size, while at the same time not stepping over the 32K array boundary. Aha, an elegant solution with a feature out of a "bug"! Steve