[net.micro] Answers About TURBO Pascal

lipman@decwrl.UUCP (02/13/84)

From: dosadi::binder  (Wanted:  A good five-cent nickel)



               I have seen several queries re:   Borland  International's
          TURBO  Pascal,  and  thought I'd pass on what I know of it from
          experience and hearsay.

          1.  TURBO Pascal is a full Jensen/Wirth Pascal except  that  it
              does  READ and WRITE rather than GET and PUT.  It also does
              BLOCK READ and BLOCK WRITE.   It  does  NOT  do  sequential
              access - it's all random access.

          2.  You can  of  course  invoke  procedures  recursively.   You
              cannot  pass  a  procedure  or a function as a parameter to
              another procedure.

          3.  The following extensions are supported:

              a.  BDOS/BIOS direct calls.
              b.  Inline code.
              c.  Include.
              d.  Absolute variable addressing.
              e.  Logical operators.
              f.  Program chaining (not overlays).
              g.  Structured constants.
              h.  Variant records.
              i.  ELSE condition on CASE statement.


          4.  String handling includes full  dynamic  strings,  with  the
              following ops:

              a.  Concat.
              b.  Copy.
              c.  Position.
              d.  Length.
              e.  Value/String (for string/variable conversion).
              f.  Delete/Insert.


          5.  You can pass parameters on the  calling  command  line,  at
              least with some systems.  IBM does, Apple may.

          6.  You  can  create  data  structures  larger  than  64Kbytes,
              although no single object may be larger than 64K:

              Var I :  array[32000] of integer;  { Works }
              Var I :  array[64000] of integer;  { Doesn't work }


          7.  TURBO is  available  for  most  CP/M,  CCP/M,  MS-DOS,  and
              similar systems.  See below, about the guarantee.


               TURBO compiles and links so fast partially because it  has
          a  really  snappy  way  of  implicit linking in memory, thereby
          avoiding much explicit linker activity.  The fast  compile/link
          times might even include some disk activity, if you have a fast
          disk.  Track-to-track slows you down  otherwise.   There  is  a
          definite difference between memory-only and disk compiles;  you
          use the memory-only version to test things and  then  you  save
          the final working version by doing a disk compile.

               The editor is very much like WordStar, except that it does
          just  fine  on  the 40-column screen of my Apple.  Turbo allows
          installation of innumerable different terminals, more  than  30
          on  the  copy  I bought, and they keep adding to it.  It allows
          redefinition of all the editor commands to make  it  look  like
          your favourite screenhacker.

               There is a money-back guarantee if it simply won't work on
          your  system.  But if Elmo Zwicky down the street turns up with
          another vendor's product and you decide you like it better,  no
          thanks.  Don't waste their time and your money.  The reason for
          the guarantee is that their master disk  can  produce  over  30
          system/format  variations,  and  if  you have some off-the-wall
          system and think you might be able to read XYZ format and  then
          find you can't, they won't penalise you for that.

               The  disk  is  not  copy-protected,  and  they  include  a
          250-page  manual  ("READ  IT!"  was what the guy said) and they
          also include, if you buy before the end of  February,  a  small
          spreadsheet  called  Microcalc,  written  in Turbo Pascal.  The
          source is included.  There are a few bugs, all the more fun  to
          find   and   fix.    This  spreadsheet  won't  compile  in  the
          memory-only mode on an  Apple,  but  it  does  just  fine  when
          compiled on disk.

               For what my opinions are  worth,  BUY  IT!!!   It  is  far
          better than any other Pascal I've dealt with.

          - Dick Binder
          decvax!decwrl!rhea!dosadi!binder

phipps@fortune.UUCP (Clay Phipps) (02/28/84)

Some of the Borland [Borlund ?] International people gave a pitch
and demo at the January 24 meeting of the Graphics Special Interest Group
(SIG) of the Silicon Valley Computer Soc'y (SVCS).
To add to what Dick Binder has already written (in "net.micro"):

The lead man at Borlund, Philippe Kahn, was one of a handful of people 
in Wirth's early [first ?] Pascal class at ETH/Zuerich
(for comparison, at the same time, the PL/I classes were jam-packed).

The Turbo development system (compler, editor, menu system, &c.)
occupies 33KB of memory (on an IBM PC).
Compilation rate is >= 2000 lines/minute (in-memory compiles, I assume).
The compiler is one pass, including the 8086 native code generator.
The system is written in 8086 assembler.

Source code limited to <= 64KB;
object code limited to <= 64KB.
Heap can be > 64KB.

The development environment is very similar to that provided
by UCSD Pascal, in that whenever the compiler detects an error,
it drops the user into the editor, with the cursor placed
on the offending source code line at the point of the error.
Run-time errors are handled similarly,
but the error can only be narrowed down to the offending statement.
System doesn't retain or can't locate variable values in memory
after a genuine crash, but those are rare [I think].

Type equivalence rules are "named equivalence",
which (if done properly) conforms to the new ANSI/IEEE/ISO Pascal Standards.
Many compilers (all those based on the P-code compilers ?) 
use "structural equivalence".  Jensen & Wirth is ambiguous on this issue.

There is little support [in my opinion] for separate compilation,
although it is allowed.  Borlund emphasizes "includes and chaining"
[UCSD or Microsoft "units" would be much preferable].
The "include" feature is pretty vanilla [I can't find notes about it].
I believe [no notes] that the term "chaining" is used in the conventional way
to mean serial execution of programs, where the nth program explicitly 
calls the (n+1)th program immediately before it (nth) terminates.
Communication between "chained" routines is done through external variables
in shared (= overlaid) memory; can also absolutely address variables.
Chained routines are grabbed from disk as needed.

Price is $49.95, including their thick typeset paperback manual.
The ~5x7 paperback is the basis of their "software protection scheme",
because it is a real pain to XER*X a thick "perfect bound" [publishing term
for the way the average phone book is bound]  These are a pain to use
as manuals because they close all by themselves when set down on a desktop.
Those wishing to distribute object code produced by Turbo Pascal
are supposed to pay an additional one-time $100 license fee;
the fee covers an arbitrary number of programs.

A "Professional Turbo Pascal" is planned which supports overlays,
"real soon now".

See also recent reviews in *Interface Age* (by Alan Miller),
*MicroSystems*, and Jerry Pournelle's column in the February [March ?] Byte.

-- Clay Phipps

-- 
   {allegra,amd70,cbosgd,dsd,floyd,harpo,hpda,ihnp4,
    megatest,nsc,oliveb,sri-unix,twg,varian,VisiA,wdl1}
   !fortune!phipps