[comp.lang.pascal] Differencces betweenn TurboPascal 3.0 and 5.*

fs_reise@rcvie@tuvie.uucp (Christian Reiser) (11/14/90)

Hi all,
	I am very sory, if an equal question like mine was posted
earlier, but I am not a PASCAL programmer and do not subscribe this
newsgroop. I just post a question for a friend, to whom I will forward
all answers.

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).

Please answer via e-mail.
Thanks in advance.

Greetings from Vienna/Austria
CR

Christian Reiser			Tel.: +431 39 16 21 / 247
Alcatel Austria-ELIN			Fax.: +431 39 14 52
Ruthnergasse 1-7			E-mail: fs_reise@rcvie.at
A-1210 Wien				    or: ...!mcsun!tuvie!rcvie!fs_reise
Austria

ts@uwasa.fi (Timo Salmi) (11/14/90)

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 ...

From my FAQ:

8. *****
 Q: Should I upgrade my Turbo Pascal version?

 A: Depends on what version you are using, and for what purposes. If
you are using version 3, the answer is a definite yes. There are so
many useful additions in the later version, including the concept of
units, and a great new useful keywords. The only reason that I can
think of for using TP 3 is that it makes .com files (which reside in
one memory segment only) instead of .exe files. 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?
   If you are currently using version 4.0, the most important point
in considering upgrading is the integrated debugger in the later
versions. It is really good, and useful if you write much code.
There are some minor considerations, as well. Later versions contain
some useful routines which 4.0 does not. (I have programmed some of
them to be available for 4.0 in my /pc/ts/tspas22.arc collection, or
whatever is the latest when you read this). Furthermore, I find
somewhat annoying that the executables will end up in the default
directory.
   If you are currently using version 5.0 the only rational reason
to upgrade is needing objects. I have also version 5.5 myself, but
switched back to version 5.0 after I had some problems with its
linking of object files. But then, I don't use nor need objects
(don't confuse linking object files and object oriented programming
here). One further point for 5.5. It has a better help function than
5.0, and a few more predefined constants.
   The real snag in upgrading (waiving the reasonable cost) is the
fact that the units of the different versions are incompatible. If
you have a large library of units (as I do) you will have to
recompile the lot. This is something that has caused a fair amount
of justifiable flak against an otherwise excellent product.
   A tip.  Don't throw away your Turbo Pascal version 3.0 manual, if
you have one. It is of use if you resort to the Turbo3 and Graph3
compatibility units.
   At the time of writing this Turbo Pascal 6.0 version has been
announced but I have no futher information.

...................................................................
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

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (11/14/90)

In article <1990Nov14.084349.13733@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes:
> Q: Should I upgrade my Turbo Pascal version?
>
>   If you are currently using version 5.0 the only rational reason
>to upgrade is needing objects. 

One other reason:  there's a bug in the code generator for 4.0 and 5.0 that
makes it handle the Extended (10 byte) real type poorly.  The code generated
makes very poor use of the 8 element internal stack on the coprocessor, so
that expressions with lots of operands like

  e1+e2+e3+e4+e5+e6+e7+e8+e9

always fail, if all the e's are of type extended.  (The generated code pushes
each operand onto the stack, then does all the adds.  It's smarter to
push and add them one at a time.)  

This makes it a real pain
translating numerical routines from Fortran, especially since constants are 
taken to be of type extended.  

The bug was fixed in 5.5.

Duncan Murdoch

abcscnuk@Twg-S5.uucp (Naoto Kimura (ACM)) (11/15/90)

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).

ts@uwasa.fi (Timo Salmi) (11/16/90)

In article <1990Nov15.092855.17865@csun.edu> abcscnuk@Twg-S5.uucp (Naoto Kimura (ACM)) writes:
>] A: from version 3, YES !
>]      Useful additions
... much deleted ...
>]   4.0 --> 5.0
... much deleted ...
Thanks for the analysis.  You've done on impressive job.

>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.

How about making it, and the rest of your ideas into a documented
package.  I'll be happy to put it up for general download from
uwasa.fi archives, if you wish so. 

>      * 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.
... much deleted ...

I've already done this one, although I had to replace ParamStr(0)
with ParamStr0.  It's part of the /pc/ts/tspas22.arc units
collection. 

...................................................................
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