Roadmap to the Compaq Visual Fortran Samples

The CompaqTM Visual Fortran (Visual Fortran) kit provides a number of source code sample programs (samples) that cover a variety of topics. These samples are provided for illustration purposes only, although they can be freely used as a basis for other programs. You can copy the samples as needed. Use a text editor to view the samples; they are not listed as topics in HTMLHelp Viewer.

On the Visual Fortran media CD-ROM, samples are located in folders under Info\Df\Samples. If you request that samples be installed using a Custom installation, the samples are by default installed in subdirectories under:

  Program Files\Microsoft Visual Studio\Df98\Samples 

If you do not install samples, you can copy appropriate samples folders or files from the Visual Fortran CD-ROM to your hard disk (remove the Read-Only attribute file property for the files copied).

The ...\Df98\Samples\Tutorial folder contains short example programs, called Tutorial samples, that describe (as source comments) how they can be built. Unlike other samples, all Tutorial samples are contained in a single directory.

Other (longer) sample programs are provided in their own subdirectories. Most samples also include a project workspace file, allowing you to open the project workspace in the visual development environment (Microsoft® Developer Studio), view the source files in the FileView pane, build the sample, and run it.

Visual Fortran samples include the following:


Advanced

Within the Advanced category, there are several other categories of samples. Each category is described below, and the specific samples within each are described in its section. Each category is contained within its own subdirectory of ..\Df98\Samples\Advanced:

Samples using Component Object Model (advanced\com)
Samples Showing Direct Fortran 90 Descriptor Manipulation (advanced\descript)
Samples Using OpenGL (advanced\opengl)
Samples Using Win32 API Calls (advanced\win32)

Dialog Boxes (Dialog)

The Dialog samples demonstrate several of the dialog controls available through Visual Fortran, including the ones that are new with V6.0. There is also a sample that demonstrates how to use modeless dialog boxes, again, new with V6.0. The dialog samples can be found in the directory ..\Df98\Samples\Dialog:

DLL Examples (DLL)

Within Visual Fortran you can create and use dynamically linked libraries (DLLs). A DLL is loaded at runtime by its calling modules (.EXE or .DLL). When a DLL is loaded, it is mapped into the address space of the calling process. There are generally two ways to bring in a DLL, either at image activation time or at run-time. If an image is linked against the import library for a DLL the code is mapped into the image's address space at image activation time. If the import library is not available, the DLL needs to be mapped in with Windows API calls. The following DLL examples can be found in subdirectories under ..\Df98\Samples\DLL:

Exception Handling

New with Visual Fortran V6.5 are some routines to make it easier for the user to control floating point exception handling. Note that all these samples must be compiled with fpe:0, and under the Release configuration, must be compiled with Optimization:None and Traceback Enabled. These switches are required to enable all floating point errors to signal, to keep the compiler from optimizing away the test cases, and to provide an accurate traceback map.

ISO Varying String (Isovar)

The ISOVAR suite of samples demonstrate one possible implementation for the interface to dynamic length character strings in Fortran 95. The publicly accessible interface defined by this module is conformant with the auxilliary standard, ISO/IEC 1539-2 : 1999

Miscellaneous (Misc)

There are a number of miscellaneous samples that demonstrate some specific aspects of Visual Fortran or its utilities. The following miscellaneous examples can be found in separate subdirectories under ..\Df98\Samples\Misc:

Mixed-Language (Mixlang)

Visual Fortran can be called by a number of other languages, including Visual C/C++ and Visual Basic. Also, it can call other languages, such as C/C++. The following samples in subdirectories under ..\Df98\Samples\Mixlang demonstrate some of the calling standards or argument definitions that must be used to effectively interwork with other languages:

QuickWin (Quickwin)

Visual Fortran provides a library of functions called QuickWin. QuickWin is a library that lets you build applications with a simplified version of the Windows interface with Visual Fortran. The QuickWin library provides a rich set of Windows features, but it does not include the complete Windows Applications Programming Interface (API). If you need additional capabilities, you must set up a Windows application to call the Win32 API directly rather than using QuickWin to build your program. The following samples demonstrate how to use QuickWin, and how to program around some of the strange paradigms of the package. The following QuickWin examples can be found in subdirectories under ..\Df98\Samples\QuickWin:

Scientific Graphing Utility (SciGraph)

SCIGRAPH is a package of Fortran routines for drawing scientific graphs. Graph types available include line, bar, XY, and pie graphs. All graphs are fully customizable, including control over axis, log scales, data points, colors and shades, error bars, and many other aspects of a scientific graph. All graphs are drawn using Visual Fortran's QuickWin graphics routines, so they can be easily added to an already existing QuickWin application. The SciGraph package can be found in ..\Df98\Samples\SciGraph:

Tutorial

All Tutorial samples are simple programs, and most of them are standalone. Each contains compilation information at the top of the file, both for command line and from within Developer's Studio. If there are multiple files, this is noted at the top of the program. All tutorial samples can be found in the directory ..\Df98\Samples\Tutorial:


Return to Top

© 2000 Compaq Computer Corporation