andrew@.uucp (441F0650.A000F5B8) (08/30/89)
From: andrew@ux.cs.man.ac.uk (441F0650.A000F5B8) Path: uk.ac.man.cs.ux!andrew Newsgroups: comp.lang.pascal Subject: Help wanted on ISO PC Pascal Expires: References: Sender: andrew@ux.cs.man.ac.uk Reply-To: andrew@.uucp (441F0650.A000F5B8) Followup-To: comp.lang.pascal Distribution: world Organization: Manchester University Keywords: ISO compatible pascal wanted 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. For reasons of compatability with the versions of the program on other machines, I am trying to keep the Pascal as "standard" as possible. Can anyone recommend a Pascal compiler for IBM PCs which does not have this "feature"? I would prefer if it was ISO standard especially with respect to file buffer handling (get and put). Thanks in advance for any help, Andrew Simm.
filbo@gorn.santa-cruz.ca.us (Bela Lubkin) (08/30/89)
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
winfave@dutrun.UUCP (Alexander Verbraeck) (08/30/89)
In article <6464@ux.cs.man.ac.uk> andrew@.uucp (441F0650.A000F5B8) 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. For reasons of compatability with the versions of the program >on other machines, I am trying to keep the Pascal as "standard" as possible. > What do you mean with a maximum array size of 256? A statement like type largearray = array[1..10000] of integer; is no problem at all in Turbo Pascal as far as I know. --------------------------------------------------------------------- Alexander Verbraeck e-mail: Delft University of Technology winfave@hdetud1.bitnet Department of Information Systems winfave@dutrun.uucp PO Box 356, 2600 AJ The Netherlands ---------------------------------------------------------------------
chris@tadhg.newcastle.ac.uk (Chris Forker - Nav Arch-) (08/30/89)
In article <13.filbo@gorn.santa-cruz.ca.us> filbo@gorn.santa-cruz.ca.us (Bela Lubkin) writes: >In article <6464@ux.cs.man.ac.uk> andrew@ux.cs.man.ac.uk writes: stuff deleted > >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 Try giving PRO PASCAL ( PROSPERO SOFTWARE ) a go. It is ISO validated and meets the level 0 requirements of ISO 7185. I think they just opened an office somewere in the US. They will send out a demo disc on request. The address in England is :- Prospero Software Ltd. 190 Castelnau London SW13 9DH Hope this helps Chris.. /---------------------------------------------------------------------------\ | mail: Chris.Forker@newcastle.ac.uk | Dept. Marine Technology | | voice: +44 91 2226000 X 6750 | Newcastle University | | fax: +44 91 2611182 | Newcastle upon Tyne | | | NE1 7RU ENGLAND | \----------------------------------------+----------------------------------/