On Apr 18, 7:17=A0pm, Terence <tbwri...@[EMAIL PROTECTED]
> wrote:
> This came up accidentally when someone asked for a copy of an old
> program, and I found how D... big it was compared to what I am used to
> passing around.
>
> I have these two menu =A0programs, one written in my usual F77style and
> compiled with MS 3.31, which came to 44,676 bytes as an executable,
> and which runs in DOS or Windows command line or I can double-click on
> it in the directory, whatever, and it runs as expected, even on
> Macintosh DOS emulators (or pretty much any machine around).
>
> At some stage (2002, I think) I brought the source of this original
> F77 program into CVF 6.6 and compiled it as a command-line program to
> do absolutely the same job.
>
> There IS a difference. In the first program I call the SPAWN function
> for loading daughter programs for execution; in the Windows version I
> had to call SYSTEM to do the same job, one line difference, even
> though both actually use the SYSTEM function, but only the DOS program
> uses SPAWN.
>
> When these programs run, even I cannot tell which is which, since both
> appear as full screen programs with the same font and colours and so
> on, and no difference in behaviour at all.
>
> BUT, the windows-compiled version is 299,008 bytes long!
>
>
[snip]
>
> I bought this point to the attention of Lahey, some time ago and they
> saw the point and permited the distribution of a loadable DLL( with
> most of the Lahey library inside), allowing small programs to be sent
> commercially and so updatable by sending new small replacement main
> modules.
>
> So if I have 60 Windows programs, I could l have say 60 small modules
> of about 60k each plus one humungous DLL of I guess 300K; total 3900k,
> instead of =A060 times 300k or 18 Megabyte to distribute?.
Look at the large size of the Salford/Silverfrost run-time library for
Fortran and C. IIRC it's about 1.5 megabytes.
>
> People wonder why I stick to F77 and DOS-in -Windows?
Good luck. Vista does not run DOS graphics. Vista does not allow text
in fullscreen mode. My good old DOS text editor runs like a dead dog
in a console window... Eventually you will not have a choice. Old
stuff just won't run anymore - or emulation will extract a large
penalty in performance.
Second, it's worth using some features of Fortran 95+. Free format,
control structures, array operations, initialization expressions,
parameter attribute, BOZ, stream I/O .... and others.
-- e


|