useful libraries for Fortran use

3 views
Skip to first unread message

Terence

unread,
Dec 19, 2009, 6:58:48 PM12/19/09
to Fortran
I write my source code in F77, then compile with MS v3.1 for MSDOS and
DOS-in -Windows environments (there are good commercial reasons for
this); I then compile the same source code using DVF 6.6c to get
native Windows environment executables (which are 15 times larger).

To acheiev this flexibility, I use two link libraries, one for MDSOS
service calls and one for Windows API service calls, in order to get
complete keyboard and screen control, colours and scrolling
transparently. (Of course I am limited to one font and 256 colours;
but can create and destroy daughter windows and handle four
simultaneneous pages and cursors).

To meet commercial requirements I also have modules that, for
example
Write reports in RTF format so that any user can cut and paste,
change fonts and sizes, and further decorate or plot data from tables,
Handle external laboratory devices and asynchonously read and write
to devices.
Manage directories and files and their dates and sizes,
Find country and region information of the environment.

I am sure very many of us keep inventing the wheel instead of reusing
or sharing modular code to achieve a practical frame fo and trap
signalsr the use of Fortran as a mathematical programming tool.

Therefore my question:
What do readers suggest as very useful subprograms which we might
exchange ideas about?


e p chandler

unread,
Dec 22, 2009, 1:08:17 AM12/22/09
to Fortran
On Dec 19, 6:58 pm, Terence <tbwri...@cantv.net> wrote:

[snip]

>  What do readers suggest as very useful subprograms which we might
> exchange ideas about?

Anything short, clever, interesting and fun. At this point, I'm a
computer hobbyist, except in VBA.

Terence

unread,
Dec 22, 2009, 5:17:58 PM12/22/09
to Fortran

Oh, come on!
I've written a SUDOKU teacher and solver/explainer which fits the
above description, but it's not also useful in the re-usable sense
(except when you're stuck with the pencil and paper). I suspect you
wrote one too, in VBA ;o)>=

Fortran is a programming tool, but limited to more wide-spread use
(e.g. instead of VBA or C++) because the committee purists felt that
the user interface to the operating system environment, vital for
display and communication (and graphics) was too complex to be part of
the definition. (Reminds me of that hand-washing story...)

But what COULD have happened "way back" would have been the definition
for Fortran users, of the user interface and the needed and optional
parameters, for the elemental operations for at least:-
Language, region, data and time, currency symbols and formats,
Keyboard data and control entry
Screen page and cursore control,
Screen buffer sizing, scrolling and filling
Asynchronous buffered port i/o
Changing the default file-search work area (change and save directory
location equivalents),
Numerical field editing (zero, blank, uderflow and overflow, currency
punctution, etc not in Format control))
Report writer elementals
Plotting elementals

... and let the manufacturers/vendors of the O/S scurry to supply
standard libraries for the purpose.

Of course, at least three familiar businesses have seen the
opportunity and offer add-ons to the commercial Fortran compilers, (at
roughly the same price again).
But this has kept Fortran from being a hacker's tool.
It became economically easier to write in C++ and call Fortran
modules, than write in Fortan and make "standard" references to the
system interface library entry.

I'll add a couple of "useful" subroutine to start with: -
a fairly general external file record sorter covering all Fortran
format field types,
(including radix represntations) and a practical number of sorting
fields fields.
a general routine to assign "n" files to a set of unit numbers, set
access modes, request or search for names, open such and return
statuses (and start with command line parameters if present) . This
replaces the bulk of each main program set-up.

Reply all
Reply to author
Forward
0 new messages