Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!agate!saturn!ucscc!gorn!filbo From: filbo@gorn.santa-cruz.ca.us (Bela Lubkin) Newsgroups: comp.lang.pascal Subject: Re: ISO compatible Pascal sought Message-ID: <13.filbo@gorn.santa-cruz.ca.us> Date: 30 Aug 89 03:21:17 GMT References: <6464@ux.cs.man.ac.uk> Organization: R Pentomino Lines: 30 In article <6464@ux.cs.man.ac.uk> andrew@ux.cs.man.ac.uk writes: > I am trying to port a large program in Pascal to an IBM PC. ( The program >has already been ported successfully to apollos, suns and vaxen.) At the >moment I am using Turbo Pascal version 4 and have run into a major problem: >the array size is limited to an upper bound of 256 where as the program uses >arrays upto 1000. Turbo Pascal arrays are not limited to a bound of 256. Why do you say that? Any individual variable cannot exceed 64K bytes in size, however. Are you trying to use a 1000 by 1000 array of characters? You would be limited to 256x256, which sort of matches what you say. Remember that MS-DOS addressible memory is generally limited to 640K, perhaps a limit of 580K for your program. If your variables won't fit into that space, you'll need to go to disk. If they will, you need to use heap structures. For instance, a declaration of Var Stuff: Array [1..1000,1..1000] Of Char; could be changed to Type StuffLine=Array [1..1000] Of Char; Var Stuff: Array [1..1000] Of ^StuffLine; Of course you'd need to make a lot of source changes, exactly what you're trying to avoid. It's not clear that you'll be >able< to avoid it on any PC compiler, though. I don't even think there >is< an ISO-standard Pascal for the PC. Bela Lubkin * * filbo@gorn.santa-cruz.ca.us CIS: 73047,1112 @ * * ...ucbvax!ucscc!gorn!filbo ^^^ REALLY slow [months] R Pentomino * Filbo @ Pyrzqxgl (408) 476-4633 & XBBS (408) 476-4945