[comp.lang.fortran] Why Does MS Fortran Compiler Need So Many %*&^%!! Floppies?

ams@philabs.Philips.Com (M. Ali Shaik) (07/29/87)

Could someone please explain, in English, why the MS Fortran compiler
needs about 5 floppies? I just 'installed' one on a IBM PC (the installation
process itself is a bitch, switching floppies in&out of disk drives. MS
advises users to make backup copies of the distribution disks, all six
of them, and 'installing' requires yet another 5 floppies to produce the
working compiler. Total = 11 floppies!). To compile a three line Fortran
program I had to switch three compiler floppies in & out of the drive!

As a non- computer scientist, I think about why the Turbo-Pascal compiler
sits on a fraction of one floppy- one would imagine Pascal needs more
space due to all the fancy data structures, and other features like recursion,
etc.

Ali Shaik   ihnp4!philabs!ams

garrett@udel.EDU (Joel Garrett) (07/31/87)

In article <1471@briar.Philips.Com>, ams@philabs.Philips.Com (M. Ali Shaik) writes:
> Could someone please explain, in English, why the MS Fortran compiler
> needs about 5 floppies? I just 'installed' one on a IBM PC (the installation
> process itself is a bitch, switching floppies in&out of disk drives. MS
> advises users to make backup copies of the distribution disks, all six
> of them, and 'installing' requires yet another 5 floppies to produce the
> working compiler. Total = 11 floppies!). To compile a three line Fortran
> program I had to switch three compiler floppies in & out of the drive!
> 
> As a non- computer scientist, I think about why the Turbo-Pascal compiler
> sits on a fraction of one floppy- one would imagine Pascal needs more
> space due to all the fancy data structures, and other features like recursion,
> etc.
> 
> Ali Shaik   ihnp4!philabs!ams

Well, for starters, Turbo Pascal is not an optimizing compiler - in order to 
tightly optimize code, the Fortran compiler has to make several passes
through the source, each pass making optimizations, and producing what leads
to the final code.  Also, Turbo is limited (without using after-market
extensions and using the heap) to a data segment of 64k, while Fortran allows
programs to have practically unlimited data and code space.  MS Fortran also
provides hooks for using a symbolic debugger, Codeview.  Turbo is not a full
implementation of Pascal, it has some extensions and doesn't come up to stand
ards in other places, but MS Fort is fully compliant with the Fortran-77 spec
and also has extensions.  Finally, MS Fort produces standard microsoft .obj
files as output, but Turbo pascal either compiles to memory or a .com file.
The production of modules is nice, because you can program in modules more
easily (ie recompile only one subroutine instead of the whole program if you
change anything.)  I'm sure I missed a few things, but that's about all I can
think of off the top of my head.  I do wish, however, that MS had a "Quick"
type Fortran as for a lot of things (quick experimentation and "off the cuff"
computation) the normal compiler is just way to bulky - Lahey has come out
with a "Personal" fortran compiler, with limitations similar to turbo pascal,
which hopefully will spur some more development in this area

Joel Garrett <garrett@udel-ccm.arpa> or <garrett@udel.EDU>

t19@nikhefh.UUCP (Geert J v Oldenborgh) (07/31/87)

> (long story about FORTRAN being complex, optimising needed, debugger
> support, complete jobs ...)

I only own an Atari ST, but the Absoft FORTRAN compiler on it is 128K and
compiles at about 2000 lines/minute (from RAMdisk).  It is a full 
implementation, includes a symbolic debugger and produces reasonable code.
In fact, I type this over a modem as I work much faster at home than on our
mainframe...

garrett@udel.EDU (Joel Garrett) (07/31/87)

In article <379@nikhefh.UUCP>, t19@nikhefh.UUCP (Geert J v Oldenborgh) writes:
> I only own an Atari ST, but the Absoft FORTRAN compiler on it is 128K and
> compiles at about 2000 lines/minute (from RAMdisk).  It is a full 
> implementation, includes a symbolic debugger and produces reasonable code.
> In fact, I type this over a modem as I work much faster at home than on our
> mainframe...

You're right, Absoft fortran is much smaller, faster, and just as complete.
But then again, it doesn't have to deal with the convolutions of the 80x86
including segmentation, funky msdos calls, etc.  All that and the support
for inter-language calling and just the Microsoft compiler mindset add up
to a big, bulky compiler - I hope the competition in fortrans puts more
pressure on MS.  Their compiler is the best for the PC but I agree that it
is too big and slow.

Joel

ken@argus.UUCP (Kenneth Ng) (08/03/87)

In article <1471@briar.Philips.Com>, ams@philabs.Philips.Com (M. Ali Shaik) writes:
> Could someone please explain, in English, why the MS Fortran compiler
> needs about 5 floppies?

It does?  Mine comes on 3 floppies.  If you keep the work files on another
it takes up 4.


Kenneth Ng: Post office: NJIT - CCCC, Newark New Jersey  07102
uucp !ihnp4!allegra!bellcore!argus!ken *** NOT ken@bellcore.uucp ***
bitnet(prefered) ken@orion.bitnet
. 
. Ali Shaik   ihnp4!philabs!ams

ams@philabs.Philips.Com (M. Ali Shaik) (08/06/87)

In article <1471@briar.Philips.Com>, ams@philabs.Philips.Com I writes:
>....whine about Fortran compilers..

Mark Moraes of CSRI, U. of Toronto, e-mailed me some good stuff in response,
which I'm posting (without permission & with apologies :-):
______________________________________________________________________

A good question, and one that I've often asked myself, when flipping
floppies. 

1. FORTRAN syntax is not easy to parse, and requires a large syntax
analyser, whereas Pascal is very elegant (from a compiler writer's
viewpoint!) syntax, and was designed to make a compiler one-pass only.
FORTRAN on the other hand, cannot get by without 3 passes, at least.
FORTRAN syntax is the most difficult of any language to parse, and
cannot even be rationally specified in formal notation like BNF. As a
classic example, the statements
      DO30I=1,50
and
      DO30I=1.50

are semantically VERY different, but just differ by one character, and
till the compiler reaches that point, it has no idea whether it is in a
DO statement or in an assignement.
For another classic example,
100   FORMAT(A3)=5
and
100   FORMAT(A3)

illustrate the problem in FORTRAN syntax very well.

2. Turbo Pascal is a wonderful development environment, but it cheats a
little by taking generating .COM files, and thus limiting the user's
object code to only 64K max. However, Turbo Pascal amply demonstartes
why Pascal is a good language to write compilers for - small, regular,
elegant - the computer scientist's language.

3. Data structures and stuff don't require very much compiler room -
they are very simple to implement (All it really takes is an indirect
addressing command). Most of the complications in the data structures
are in user programs, but because of the utterly regular structure of
Pascal, it is very easy to compile.

4. Turbo also cheats by doing a one-step scan, parse and link to produce
object code directly. While this makes for a very fast compiler, it does
not make it easy to port the compiler to other machines, and does not
allow the user to link Pascal programs with C or FORTRAN subroutines.
Microsoft tries to use the same back end for their compilers (i.e. PAS2
and PAS3) and leave only PAS1 identical, if I remember right. (It's a
while since I used their compilers - I hate them!)

5. I suspect Microsoft wrote the compilers with the viewpoint "non
computer-wizards will use BASIC, if they use compilers, they must have
hard disks (and hence lots of money - comparing Microsofts prices with
Borland makes me sick:-)". I find the Ryan-McFarland Pro FORTRAN
compiler much nicer, and generates compact efficient code. Microsoft's
Pascal and FORTRAN compilers generate such lousy code that I wonder whty
they claim tehm to be optimizing.

7. In short, apart from Microsoft BASIC, I am very suspicious of their
compilers. Their F77 is only the specified ANSI subset, not the full
ANSI - at least the version I have. I refuse to waste any more money on
any more of their compilers.  I have version 2 of their pascal and
Fortran, and Turbo Pascal. I have used Ryan-McFarland (IBM Pro. FORTRAN)
at work (it requires a hard disk and 8087) and find it nice, but slow to
compile even then. FORTRAN is not a language for microcomputers.
(neither is COBOL). Turbo is a great product, till you want to write
really big programs, at which point you have to start overlays, which I
though went out with the PDP-11! Pity, because I really like it. And
I'll never understand how they crammed a Wordstar like editor and a
Pascal compiler into 35K - even for Pascal, that's extraordinary. 

8. Any serious compiler on the severely brain-damaged 8086 family, below
the 80286 takes a hell of a lot of work - unless you duck the issue and
keep to 64K code only. "Segments are for worms" - Just look at the
FORTRAN compilers on the Amiga or the Atari ST, or the Stride Micros, or
on Suns - MUCH smaller. 

Regards,
	Mark. (moraes@csri.toronto.edu)