damm@freja.diku.dk (Kristian Damm Jensen) (06/29/89)
acm9@apple.ucsb.edu (Mike O'Brien) writes: >I think everyone would agree that Borland International's "Turbo Pascal" >is the current standard in MS-DOS. I asked for a STANDARD. Not what some company want to promote as a de facto standard just because they can't figure out how to do it rigth. --- Kristian
milne@ics.uci.edu (Alastair Milne) (07/01/89)
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? >Used in conjunction with the seek command, I find read/write almost >identical to array access for a file of records, which is quite helpful. 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.) I don't know that GET and PUT are necessarily "better" than read or write, but they are certainly more standard. Using them, I can transport typed file I/O among a number of Pascal dialects; Turbo is the only one I know of that overloads READ and WRITE, so it's the only one where that will work. I can't see any real advantage in SEEK and READ, rather than SEEK and GET: SEEK( RecordFile, RecordIndex); READ( RecordFile, NewRecord); or SEEK( RecordFile, RecordIndex); GET( RecordFile); NewRecord := RecordFile^; { In Turbo, this assignment is impossible, because the file variable isn't a window pointer, so it can't be dereferenced. } As far as I'm aware, the principal impact of this substitution is that porting things between Turbo and other dialects gets a little harder. Alastair Milne
ags@mentor.cc.purdue.edu (Dave Seaman) (07/02/89)
In article <18965@paris.ics.uci.edu> milne@ics.uci.edu (Alastair Milne) writes: >mlw@pyr.gatech.EDU (Michael Williams) writes: [ Re: Borland leaving out PUT/GET ] > I don't know that GET and PUT are necessarily "better" than read or write, > but they are certainly more standard. Using them, I can transport typed > file I/O among a number of Pascal dialects; Turbo is the only one I know of > that overloads READ and WRITE, so it's the only one where that will work. PUT/GET is neither more nor less standard than READ/WRITE. The standard specifies that READ(f,v) is exactly equivalent to "v := f^; get(f)", and that WRITE(f,v) is exactly equivalent to "f^ := v; put(f)". If a compiler does not allow you to use both, then it isn't Pascal. If a compiler does not allow you to pass procedures or functions as arguments to other procedures or functions, then it isn't Pascal. If a compiler limits the length of identifiers or does not consider all characters in the identifier to be significant, then it isn't Pascal. On the other hand, a compiler can allow all of the extensions that have been discussed (such as variable-length strings), and still be standard Pascal. Those who are claiming that Turbo is "better" than standard Pascal need to get this straight.
afoiani@nmsu.EDU (Anthony Foiani) (07/02/89)
const USABLE='efficient, fast, easy_to_use" if Pascal isn't time-effective (i.e. more time munching over donuts instead of code-crunching) then it isn't a USABLE language. if Pascal doesn't create efficient code... then it isn't a USABLE language. if Pascal requires me (or anyone else) to spend more time learning the process of compilation/linking/etc. than developing algorithms and code... then it isn't a USABLE language. hmm... I wonder. having only 8 significant letters in a variable name gives you only ... 2.46822880546E+12 unique variable names. obviously, this is an *important* obstacle in program development. ------------ enuf I am not arguing that Turbo is better than standard Pascal (altho in my mind it is...:=); I am arguing that 'standard' anything is implicitly better than 'nonstandard' anything else. I am also asking that when you look at a language, it should be as a whole; not just one particular little glib of syntax. The original posting mentioned "instruction" of Pascal; To me, the easiest way to learn a language is to be able to "hop right in." It is easier to teach a classful of students "type this in, then hit Control-F9" than "type this in, exit the editor, compile the program, link the program, run the program"... not to mention the time differential. One parting shot: if *everyone* stuck to standards *all* the time... where would society be today??? "No, Wilbur... only birds can fly" "Marconi, you idiot.... thinking pretty little sparks can go anywhere..." etc. laters, -- tony foiani (afoiani@nmsu.edu) "And remember...don't lose your (mcsajf@nmsuvm1.bitnet) head..." -The Kurgan, HIGHLANDER