Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!csun!Twg-S5!abcscnuk From: abcscnuk@Twg-S5.uucp (Naoto Kimura (ACM)) Newsgroups: comp.lang.pascal Subject: Re: Differencces betweenn TurboPascal 3.0 and 5.* Message-ID: <1990Nov15.092855.17865@csun.edu> Date: 15 Nov 90 09:28:55 GMT References: <1089@rcsw21.rcvie@tuvie.uucp> <1990Nov14.084349.13733@uwasa.fi> Sender: news@csun.edu (News Administrator) Organization: California State University at Northridge Lines: 140 In article <1990Nov14.084349.13733@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes: ]In article <1089@rcsw21.rcvie@tuvie.uucp> fs_reise@rcvie.at (Christian Reiser) writes: ]... part deleted ... ]>Till now he worked whith TurboPascal 3.0 and thinks of upgrading to 5.*, ]>but there are rumours of very significant differences even of not being ]>upward compatible. ]> ]>The question is, what are the most important differences, are they realy ]>worth changing the version and learning and would you update? (Do not tell ]>me it depends on what he wants to do, just answer globaly). ]... part deleted ... ] ] ... (paraphrasing Prof. Timo Salmi:) ... ] ] Q: Should I upgrade my Turbo Pascal version? ] ] A: from version 3, YES ! ] Useful additions ] * UNITS allows separately compiled modules ] * new keywords ] * EXE files generated instead of COM (programs can now be >64K) ] The only bad part is the lack of overlays for programs that ] could exceed 640K. Overlay support was re-introduced in 5.0 ] (more on this later). * WARNING: Typed constants are no longer in the code segment! They are now part of the data segment. * Device independent graphics library ! No more dealing with CGA-only built-in library. Autodetecting initialization routine selects proper graphics driver. Many of the routines that were in the Turbo Graphix library are standard in the graphics library. * "Smart linker" strips out unused code ! ("hello, world" programs don't take up 13K+ because the entire runtime library is included in executable. * Can now link in .OBJ files directly. Saved me a bunch of confusion from .COM files that weren't really programs. * Nicer integrated environment -- pull-down menus. Nicer installation program -- full-screen oriented and more forgiving (you'll know what I mean when you try going through the editor re-configuration). * Command line version of compiler * Text windows work properly (except where the BIOS doesn't do it right) * Output by default goes through the standard DOS input and output files, which means you can redirect I/O. * Some limited typecasting ability. * Feature of Text File Device Drivers (TFDD's) allows one to build library of specialized text file I/O routines. On versions 3.0, it worked only for defined device file variables, while in versions 4.0 and later, you can do this with any file variable ! ]... As an accounting and ]business finance teacher and researcher I've been somewhat surprised ]to see postings stating that some users still have to program in TP ]3.0 because their employer doesn't want to take the cost of ]upgrading. I find this cost argument ridiculous. How about some ]consideration for cost effectiveness and productivity? I consider this behaviour of employers to be cruel... I remember I had to fork out $70 of my own money for Turbo Pascal 4.0 because my former employer was unwilling to get it, even when I convinced him that the 40,000+ piece of code was far too long for version 3.0 to handle (I was taking breaks to go down to the conveniece store for a Coke every time I compiled the program). After he saw what the product, he asked if he could get a copy of the program from me. I refused of course, and told him to get his own copy. ] 4.0 --> 5.0 ] * Integrated debugger * Constants decarations may be expressions (provided that they can be evaluated at compile-time). * Procedural types introduced -- allows passing of procedures and functions as parameters (don't confuse with passing the results of a function as parameters). The notation is very similar to that used in Modula-2. * improved typecasting ability. * Circular unit references allowed (with some restrictions of course). * Overlay manager re-introduced, but performs overlays on the unit level instead at the procedure level. This allows more reasonable arrangement of code (in version 3.0, you had to put unrelated code within the same overlay group, which meant you ended up grouping completely unrelated routines together -- which could get really confusing). * Graphics library allows installation of third-party graphics drivers. * Some new functions and procedures in standard libraries. * Slight annoying differences in integrated environment. ] 5.0 ---> 5.5 ] * OOP * Help function in integrated environment has code examples. It also has a paste option. * Revised overlay manager * Slight improvement in optimization * Few more graphics primitives in graphics library. ] At the time of writing this Turbo Pascal 6.0 version has been ]announced but I have no futher information. Some things I've heard about recently (haven't seen the product yet, and so I don't know if all of these things are true): * New IDE -- same one used in Turbo C++. - Multiple text windows, resizable - Full mouse support - options are selected by input panels. - project file manager - better memory management -- swaps out to harddisk ] ]................................................................... ]Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) ]School of Business Studies, University of Vaasa, SF-65101, Finland ]Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun //-n-\\ Naoto Kimura _____---=======---_____ (abcscnuk@csuna.csun.edu) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !! P.S.: * If there's enough interest, I'll repost some include files that can be used with Turbo Pascal 3.0 which implement some DOS-related functions that are built into one of version 4.0's libraries. * I'll also post the sources to a unit for version 4.0 that implements functions available in version 5.0 if there is enough interest in it. * I'm considering spending a little time hacking out some code for version 4.0 so that ParamStr(0) will return the name of the program. * I might also in the process produce an alternate set of functions that allow access to the command line arguments, but parsed in a manner similar to how they would be interpreted by the bourne shell (within limits imposed by DOS and Turbo Pascal).