Electronic Review of Computer Books

[ ERCB Home | New | Feature | Brief | DDJ | Letters | Links ]

[an error occurred while processing this directive]

Vital Statistics

Title Digital Visual Fortran Programmer's Guide
Author Michael Etzel and Karen Dickinson
Publisher Digital Press, Butterworth-Heineman
http://www.bh.com/digitalpress/
Copyright 1999
ISBN 1-55558-218-4
Pages 755
Price $49.95


Visual Fortran

I open the box from Dr. Dobb's and dump out a pile of books with titles like Java for Taxidermists and The TCP/IP Grommets and Squidgens Haftorah: Revised Edition, all white and bright and welcoming. Wait, what's that in the corner of the box? A big, heavy, moody blue book with an abstract cover graphic resembling a VT-100 function keypad -- it's the Digital Visual Fortran Programmer's Guide, by Michael Etzel and Karen Dickinson, crouching like a dinosaur ready to leap upon me and eat my brain for a week or so.

Compaq's Digital Visual Fortran development environment (http://www.digital.com/fortran/) delivers modular Fortran 90/95 as a tool of Win32 programming. Visual Fortran aims to empower the programmer to deploy Fortran code either as a standard linkable component of Win32 programming--that is, to link to C++ or Basic -- or as a standalone application within the Win32 graphical environment. It runs on Intel (Windows 95/98) and Intel/Alpha (Windows NT 4.0 with SP 3 or later). Digital Fortran, the language itself, is, furthermore, also present on Alpha (Digital UNIX and OpenVMS). Digital Visual Fortran Programmer's Guide is, so to speak, the programmer's guide to Digital Visual Fortran. Its contents include chapters titled:

Digital Visual Fortran's IDE is Microsoft Developer Studio, which is shipped with the toolset. I borrowed a copy of Digital Visual Fortran and installed it to run from CD-ROM without incident, despite my rejection of a request to install Internet Explorer. InstallShield merely warned that I might not be able to use online help and other features. I copied the sample directories to disk, loaded the workspaces, and built the examples just as with any other Dev Studio toolset.

Development is, of course, wizard-fronted and supports creating:

So while Fortran carries with it a certain number of novelties and surprises (free-format Fortran is like C code minus the semicolons and curly braces), there are few surprises for the experienced Dev Studio programmer inherent in the development environment itself. Of course, once you have built four or five projects and have accrued enough hideously formatted autogenerated NMAKE makefiles to represent all kinds of projects, you may cheerfully decide to ditch the IDE, use your favorite editor, and build with the DF command. As you might expect, Visual Fortran provides a shortcut to a script that brings up a suitable command-line environment.

Compaq/Digital's corporate culture of copious high-quality documentation shows to advantage in this product. The CD-ROM contains, in addition to IE4-based help, several PDF-format files comprising Visual Fortran's formal documentation, among which are found "Digital Visual Fortran Getting Started," "Digital Visual Fortran Language Reference Manual," and "Digital Visual Fortran Programmer's Guide." The first two books are shipped with Digital Visual Fortran in hardcopy. The weighty Digital Visual Fortran Programmer's Guide you may read online from the PDF, or you may purchase an enhanced and reedited hardcopy version. The hardcopy publication of the Programmer's Guide occasioned this review.

I was curious how the print book Digital Visual Fortran Programmer's Guide came about as an independent offering. William Youngs, engineering manager of the Compaq/Digital employee duo who wrote the book, described its publication as the work of "a couple dedicated writers who listened to the customer feedback and found a creative way to keep our costs down while giving our customers what they asked for." The customers wanted hardcopy, so Etzel and Dickinson worked many hours on their own time to prepare the version of the text for print publication, starting with the PDFs that Dickinson was transforming from HTML for the upgrade from Digital Visual Fortran Version 5 to Version 6.

Incidentally, the included-with-the-toolset "Language Reference Manual" is fascinating in its own right. A mature piece of technical writing tasked with describing Digital Fortran across several platforms and host operating systems permits you to catch up on what has happened to Fortran since Fortran IV, and also entertains you as you untangle sentences such as this: "A comment indicator can precede the first statement of a program unit and appear anywhere within a program unit," which sounds like the comment indicator daring to appear before the first statement acquires a doppleganger prone to manifest itself spontaneously elsewhere in the program unit, but we've decided what the writer really meant was: "A comment indicator can appear anywhere within a program unit, even before the first statement in the program unit."

There really are a lot of sample projects included with Digital Visual Fortran, about 114 [ls -lR SAMPLES | grep -i DSW | wc]. The samples afford you quite a Fortran education, including possibly unintentionally frank insights into the unworldly nature of the Fortran geek, as in the SAMPLES\QUICKWIN\CLEANWIN code, which throws a Fortran run-time library exception when the user, prompted for a number, responds with an alphabetical character.

The graphical examples are nicely done and serve well to illustrate integrating algorithms classically expressed in Fortran integrated with a modern GUI as in SAMPLES\ADVANCED\OPENGL\WAVE. It is one of those ineffable Zen moments when you discover that the nexus of a world-coordinate transform in SAMPLES\ADVANCED\WIN32\WORLD is not Fortran itself, but the Win32 API SetWorldTransform().

Included with Digital Visual Fortran is the Digital Array Visualizer -- an OpenGL app allowing you to graph data and interactively zoom and rotate the representation. The array viewer can be made part of a Visual Fortran application (or other Win32 application) via OLE automation. Impressive samples coded in C and Fortran utilizing the viewer are provided.

There are freightloads of proven, tested, fully characterized Fortran library routines out there that people are reusing. Reusable Fortran software objects date back to the 1950s and every year since then. Take a look at "Numerical Recipes in Fortran 77." Remember that any code you author may linger long enough for your grandchildren to someday sneer at it condescendingly.

I'm having a blast with Digital Visual Fortran. It's very satisfying to dink around with a shiny, well-done development system for a classic, difficult, but rich and honorable language. As one who can get all weepy-eyed over the VM/ESA assembler macro libraries ("Look at the maturity of this code! Gee, a lot of the guys and gals who wrote this stuff are, like, gone ..."), I really appreciate people who can play the classics.

I've been chronically allergic to Dev Studio since 1995, when I began to appreciate to what degree adapting your workstyle to Dev Studio's concept of a project (and, indirectly, adapting your configuration practices to SourceSafe's idea of configuration management) negatively impacts the quality of the deliverables. But if you are willing to submit to Dev Studio, it is really easy to use here in Digital Visual Fortran, as in all the "Visual" family of development tools exerting their artistically ambiguous influence over our profession today.

Fortran was conceived at a time when "program structure" meant "how many punch card columns do I indent?" Fortran was created by and for people who view electronic digital computers as titanic number crunchers. A Fortran program unit is supposed to calculate something. So do not underestimate the challenge of writing coherent, deployable, maintainable user interface code in Fortran; it's objectively easier to write the interface in C++ or Basic and link your Fortran routines as a DLL. That is, unless you're a lifelong Fortran coder who doesn't want C++ or Basic and would rather wrestle event-driven Fortran to the mat. This latter has been made as straightforward as it's ever likely to get. Code such as

integer function ScaleDlgProc( hDlg, uMsg, wParam, lParam )
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_ScaleDlgProc@16' ::
ScaleDlgProc
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS : 'ScaleDlgProc' :: ScaleDlgProc
!DEC$ ENDIF

is only exotic to those who have never looked at the symbol table for their Win32 C compilation units, and if

lpszAppName = "World Coordinate Transforms "C
hWnd = CreateWindowEx(0, "WorldClass"C,&
"World Coordinate Transforms "C, &
INT(WS_OVERLAPPEDWINDOW),&
0, &
0, &
CW_USEDEFAULT, &
CW_USEDEFAULT, &
NULL,&
hmenu, &
hInstance,&
NULL &
)
i = ShowWindow( hWnd, nCmdShow )
do while( GetMessage( mesg, NULL, 0, 0 ) .NEQV. .FALSE.)
i = TranslateMessage( mesg)
i = DispatchMessage( mesg)
end do

gives you pain, you better shy away from Windows.

So you're buying the toolset and you remember this review and try to decide whether or not to also purchase the hardcopy book. You realize that most of the book we're discussing is in PDF on the Digital Visual Fortran CD-ROM. So why buy the book? Because:

As an aside, if you are considering Fortran on Win32, Polyhedron Software (http://www.polyhedron.co.uk) compares Win32 Fortran compilers, focusing on issues such as:

The site is easily navigated and offers downloadable test suites.

-- Jack J. Woehr


Quick Rating

Readability Star Star Star
Originality Star Star
Organization Star Star Star HalfStar
Accuracy Star Star Star Star
Consistency Star Star Star Star
Depth Star Star Star
Timeliness Star Star Star
Editing Star Star Star Star
Design Star Star Star Star
Overall Value Star Star Star

Explanation of ERCB rating scale: No stars = unacceptable, 1 Star = marginal, 2 Stars = average, 3 Stars = above average, 4 Stars = exceptional.


Copyright © 1999 Electronic Review of Computer Books
Created 7/16/1999 / Last modified 7/17/1999 / webmaster@ercb.com