Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!purdue!haven!mimsy!jds From: jds@mimsy.UUCP (James da Silva) Newsgroups: comp.lang.pascal Subject: Re: Standard Pascal Message-ID: <18349@mimsy.UUCP> Date: 1 Jul 89 16:08:37 GMT References: <8616@pyr.gatech.EDU> <18965@paris.ics.uci.edu> Reply-To: jds@mimsy.umd.edu (James da Silva) Organization: University of Maryland, Department of Computer Science Lines: 50 In article <18965@paris.ics.uci.edu> milne@ics.uci.edu (Alastair Milne) writes: >mlw@pyr.gatech.EDU (Michael Williams) writes: >>Borland obviously left get and put out of turbo pascal for a reason. >>Can anyone tell me why get and put are better than read and write? > > I suspect the reason was nothing more profound than a desire to simplify the > parse tables -- and the number of predeclared routines. (Though there is > perhaps a more substantial reason: they haven't implemented file variables > as pointers to the file window, which is what -- or close to what -- most > Pascal's do. See below about the consequences of not doing so.) > From the Turbo Pascal 3.0 Reference Manual, Appendix D: "The reason for this is threefold: Firstly, Read and Write give much faster I/O; secondly, variable space overhead is reduced, as file buffer variables are not required, and thirdly, the Read and Write procedures are far more versatile and easier to understand that (sic) Get and Put." The "faster I/O" comment has to do, I think, with whether or not you have to copy data into the file buffer (after get/before put). Remember that Turbo Pascal has its roots in CP/M; the extra space required by file variables could be very prohibitive in a 56 or 64k system. Turbo Pascal version 3 was a beautiful system. The editor/compiler/linker and library fit in 39K. No bells and whistles, but it was slim and fast, and it worked well. You could forgive it its warts and ommissions, because there wasn't anything else like it. If you didn't have $350 for a C compiler, it was either Turbo Pascal or BASIC. Borland could now easily slip in support for Standard Pascal into their bloated product, perhaps through an alternate library. Alas, they are too busy playing the Pied Piper to their customers; leading them down the Primrose Path of Creaping Featurism. Right now people are too charmed to realize that they are chaining themselves to Borland. If you are lucky, Borland will choose to support the inexpensive, RISC-based graphic Unix workstations of the early 90's, but you will not escape the $40 (or whatever) per annum tithe to get the latest update. No, you will pay it with a smile on your face. Sorry about the sarcastic tone; this has nothing to do with the article I'm replying to. Does anyone else agree with me? Jaime ........................................................................... : domain: jds@mimsy.umd.edu James da Silva : path: uunet!mimsy!jds