Chapter 7 Product Highlights
This chapter contains the following sections:
- 7.1, Using the Sample Programs
- 7.2, Compaq Fortran Language
- 7.3, Using the Command-Line Interface
- 7.4, Using Compaq Extended Math Library (CXML)
- 7.5, Mixed-Language Programming Support with Visual C++ and Visual Basic
- 7.6, Viewing Online Documentation in the HTML Help Viewer
- 7.7, Using the Array Visualizer
- 7.8, Using the IMSL Libraries (Professional and Enterprise Editions)
- 7.9, Using f90SQL-lite
- 7.10, Using Enterprise Toolkit and Technical Programming Extensions (Enterprise Edition)
- 7.11, Support for COM and Automation Objects: Fortran Module Wizard
- 7.12, Support for Creating COM Servers (Professional and Enterprise Editions)
- 7.13, Interface Definitions for Routines
Note:
For information about how to use Visual Fortran, see Chapter 6, Using Visual Fortran.
7.1 Using the Sample Programs
Visual Fortran has several sample programs that you can view and copy for use with your own projects.
Use a text editor to view the source code samples. They are not listed as topics in the HTML Help Viewer.
Note:
To install the samples during installation, choose a Custom installation and turn on the Sample Programs checkbox.
For a description of the samples, open the file Samples.htm in a Web browser (use the File: Open menu item). Table 7-1 shows where to locate Samples.htm and the Samples folders on the Visual Fortran CD-ROM (at any time) or on your hard disk (after installation).
For example, after a Custom installation, the \Project Files\Microsoft Visual Studio\Df98\Samples\Tutorial folder contains short example programs. The tutorial samples describe (as source comments) how the programs can be built.
Longer sample programs are also provided in subfolders and include the source files. Most samples include a project workspace file, allowing you to open the project workspace in the visual development environment, view the source files in the FileView pane, build the sample, and run it.
Note:
If you do not install samples, you can copy the samples folders or files from the Visual Fortran CD-ROM to your hard disk. (Remove the Read-Only Property of the copied files.)
For information about Array Visualizer, CXML, and IMSL samples, see the following sections:
- 7.7, Using the Array Visualizer
- 7.4, Using Compaq Extended Math Library (CXML)
- 7.8, Using the IMSL Libraries (Professional and Enterprise Editions)
7.2 Compaq Fortran Language
Visual Fortran uses the highly efficient, optimizing Compaq Fortran compiler system, which supports the Compaq Fortran language on multiple platforms (architecture and operating system pairs).
The Compaq Fortran language provides a superset of the Fortran 95 standard with extensions for compatibility with:
- Previous versions of Compaq Fortran (DEC Fortran and VAX FORTRAN)
- Microsoft Fortran PowerStation Version 4
Compaq Fortran conforms to the following standards:
- Fortran 95 standard, American National Standard Programming Language Fortran 95, and the International Organization for Standards Programming Language Fortran, ISO/IEC 1539-1:1997 (E)
- Fortran 90 standard, American National Standard Programming Language Fortran 90, ANSI X3.198-1992, and the International Organization for Standards Programming Language Fortran, ISO/IEC 1539-1:1991 (E)
- FORTRAN 77 standard, American National Standard Programming Language FORTRAN, ANSI X3.9-1978
- FORTRAN IV (FORTRAN 66) standard, American National Standard Programming Language FORTRAN, ANSI X3.9-1966
Fortran 95 provides all the original features of Fortran 90 and FORTRAN 77, and adds the extensions and flexibility of newer languages. Some features of the older standard have been declared obsolete or deleted. Although Visual Fortran still recognizes these features, new application code should use the new constructs provided to replace the obsolete or deleted ones.
Compaq Fortran also supports the most widely used Fortran language extensions supplied by vendors on other platforms.
For information about Fortran 95/90 language features, Compaq Fortran language extensions, and other details about the Compaq Fortran language, see:
- The Compaq Fortran Language Reference Manual described in Section 8.1, Printed (Hardcopy) Documentation
- The online Language Reference described in Section 8.2, Documentation Available in HTML Help Viewer Format
7.3 Using the Command-Line Interface
In addition to the visual development environment, Visual Fortran supports the use of the command-line interface in a command-line window.
You can use the Fortran Command Prompt, located in the Compaq Visual Fortran 6 program folder.
If you use this icon, the command-line window appears with the DFVars.bat file already executed.
The DFVars.bat file sets the appropriate environment variables (such as PATH, INCLUDE, and LIB) as well as the appropriate environment variables for IMSL routines (when using the Professional or Enterprise Edition) for your command-line window environment. The file is located in the following directory:
\Program Files\Microsoft Visual Studio\Df98\BINIf you use an MS-DOS window instead of the Fortran Command Prompt window, you need to execute the DFVars.bat file yourself.
For more information on the command-line interface, see the following topics in the online Programmer's Guide:
- To compile and link your application with the DF command, see Using the Compiler and Linker from the Command Line.
- For a list of compiler and linker options, see Compiler and Linker Options.
- To use the FL32 command or FL32-style compiler options, see Microsoft Fortran Powerstation Command-Line Compatibility in Compiler and Linker Options.
- To use command-line tools like NMAKE, see Using Visual Fortran Tools.
To access the Programmer's Guide, see Section 8.2, Documentation Available in HTML Help Viewer Format.
7.4 Using Compaq Extended Math Library (CXML)
The Compaq Extended Math Library (CXML) consists of mathematics routines designed for use in many different types of scientific and engineering applications.
Note:
To install CXML during installation, choose a Custom installation and turn on the CXML Libraries checkbox.
The following routines are in CXML:
The BLAS routines include the industry-standard Basic Linear Algebra Subprograms for Level 1 (vector-vector or BLAS1), Level 2 (matrix-vector or BLAS2), and Level 3 (matrix-matrix or BLAS3). Also included are subprograms for BLAS Level 1 Extensions, Sparse BLAS Level 1, and Array Math Functions (VLIB).
The Signal Processing routines provide a basic set of signal processing functions. Included are one-, two-, and three-dimensional Fast Fourier Transforms (FFT), group FFTs, Cosine/Sine Transforms (FCT/FST), Convolution, Correlation, and Digital Filters.
The Sparse Linear System routines provide both direct and iterative sparse linear system solvers. The direct solver package supports both symmetric and nonsymmetric sparse matrices. The iterative solver package contains a basic set of storage schemes, preconditioners, and iterative solvers.
LAPACK is an industry-standard subprogram package offering an extensive set of linear system and eigenproblem solvers. LAPACK uses blocked algorithms that are better suited to most modern architectures, particularly ones with memory hierarchies.
Utility routines include random number generation, array math functions, and sorting subprograms.
CXML includes certain Fortran source and module files, an online PDF file that describes each CXML routine, numerous program samples, and other assorted files.
For more information about CXML, see the following:
- The Compaq Extended Math Library Reference Guide described in Section 8.4, Documentation Available in PDF Format.
- Using the Compaq Extended Math Library (CXML) in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format.
- The CXML section of the Visual Fortran release notes. See Section 2.2, Release Notes.
- The CXML readme file installed in: \Df98\CXML
- The CXML samples installed in: \Df98\CXML\Samples
- The Compaq Math Libraries Web page at: http://www.compaq.com/math
7.5 Mixed-Language Programming Support with Visual C++ and Visual Basic
Mixed-language programming occurs when an application has source code written in two or more languages.
Compaq provides Visual Fortran. Microsoft provides Visual C++, Visual J++, Visual Basic, Microsoft MASM (Assembler for IA-32 (x86) systems), and other Visual Studio tools. Mixed-language programming is possible among all these languages.
Mixed-language development is especially easy when you use the same versions of Visual C++ and Visual Fortran, because they use the same visual development environment. Having a common development environment lets you edit, debug, link, and compile Fortran and C/C++ modules transparently.
If you need to use language products that use a different version of the visual development environment (or a different development environment) than Visual Fortran, you cannot use the same visual development environment to build all parts of the mixed-language application.
When other languages in a mixed-language application use a different version of Microsoft's visual development environment, you can copy object files into your project workspace and use the visual development environment to link them into your application.
Another way to build a mixed-language application is to link the Fortran object module directly into a C/C++ program.
Visual Basic and Visual Fortran do not share the same visual development environment. However, you can use Visual Basic to create a graphical user interface for an application and use Visual Fortran to create Fortran DLLs or a COM server from existing Fortran source code to build the numerical calculation engine `back end' of a 32-bit Windows application.
For more information, see the following topics in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format:
- For information on creating DLLs that work with other applications, see Creating Windows Applications.
- For information on creating a COM server, see Creating a COM Server.
- For information on mixed-language programming, see Programming with Mixed Languages.
For more information, see the Microsoft Visual Studio Web site at:
http://msdn.microsoft.com/vstudio/7.6 Viewing Online Documentation in the HTML Help Viewer
Internet Explorer Version 4 Service Pack 1 is required before you can view online documentation in the HTML Help Viewer. See Section 3.4.4, Installing Internet Explorer.
To view the Visual Fortran online documentation in the HTML Help Viewer, do one of the following:
- Click the Online Documentation item in the Compaq Visual Fortran 6 program folder.
- After you start the visual development environment, click Contents on the Help menu.
The HTML Help Viewer displays the table of contents for the online reference books that are available. The books contain hypertext links to various topics.
Click on the titles in the window to expand the titles and see which documentation is available. For example, click on Compaq Visual Fortran 6.6, then click on Visual Fortran, then click on Compaq Visual Fortran, and so forth. The result will be similar to Figure 9-1, HTML Help Viewer.
- Section 8.2, Documentation Available in HTML Help Viewer Format
- Chapter 9, Using the HTML Help Viewer
7.7 Using the Array Visualizer
The Compaq Array Visualizer is a software tool that lets you view and analyze data graphically. The Array Visualizer's advanced data visualization techniques let you discover hidden patterns in large, multidimensional arrays. An extensive number of customization options allow you to bring out the important features of your data. The Array Visualizer uses OpenGL, a high-speed 3D rendering library, to let you move, rotate, and zoom data graphs.
The Array Visualizer includes several software components described in the following sections:
- 7.7.1, Array Viewer
- 7.7.2, Aview Routines Library
- 7.7.3, Avis2D and AvisGrid ActiveX (OCX) Controls
- 7.7.4, Enhancements to the Visual Development Environment
The Array Visualizer is available with the Visual Fortran Professional and Enterprise Editions.
Note:
Only the Array Viewer component is available with the Standard Edition.
7.7.1 Array Viewer
The Compaq Array Viewer is a Windows application that displays array data in two adjustable panes:
- The top pane shows the array's numeric values in a scrollable spreadsheet.
- The bottom pane displays a graphical view of the array data as a three-dimensional surface. Other viewing modes include graphical representation of the array data as plane view image map, vector graph, or two-dimensional chart.
Figure 7-1 shows a typical Array Viewer window.
7.7.2 Aview Routines Library
The Aview routines library contains a set of subroutines that allow Visual Fortran or Visual C++ applications to display array data using the Array Viewer (by means of OLE Automation). Using this library, you can create data visualization applications with just a few lines of code. The library routines can also save array data as a file for later viewing with the Array Viewer.
7.7.3 Avis2D and AvisGrid ActiveX (OCX) Controls
The Avis2D and AvisGrid ActiveX controls can be used by any development environment that supports ActiveX controls (Visual C++, Visual Basic, Visual Fortran dialogs) to display array data in a variety of graphing modes. The Avis2D control provides more than 100 properties, methods, and events that you can use to customize its behavior. The AvisGrid control can be used to create tables of array data using about 30 properties, methods, and events.
7.7.4 Enhancements to the Visual Development Environment
The Array Visualizer enhances the visual development environment to let you select an array in the debugger Watch window and use the Array Viewer to inspect it. You can update the view to observe changes in the array data as the program executes.
7.7.5 Array Visualizer Samples
Sample applications are provided with Array Visualizer. You must choose the Complete option during the Array Visualizer installation to install these, as described in Section 3.6, Installing Array Visualizer (Professional and Enterprise Editions). By default, the samples are installed in a folder under:
\Program Files\ArrayVisualizer\SamplesThe file Samples.htm summarizes the Array Visualizer samples.
Note:
If you do not install samples, you can copy the samples folders or files from the Array Visualizer CD-ROM to your hard disk (remove the Read-Only Property of the copied files).
7.7.6 Installing Array Visualizer
You can install Array Visualizer after you install Visual Fortran or at a later time. See Section 3.6, Installing Array Visualizer (Professional and Enterprise Editions).
If you have the Visual Fortran Standard Edition, see Section 3.5, Installing Array Viewer (Standard Edition).
7.7.7 Starting Array Viewer
You can start Array Viewer from the Compaq Array Visualizer program folder, or double-click the file Aviewer.exe in Windows Explorer (installed by default in the directory \Program Files\ArrayVisualizer\Bin).
If you've installed the Array Visualizer samples described in Section 7.7.5, Array Visualizer Samples, you can use the Array Viewer to view some sample data files in the Samples\Data directory.
7.7.8 Information about Array Visualizer
For more information, see the following:
- The Array Visualizer release notes. You can read the release notes by opening the Relnotes.txt file located in the root directory of the Array Visualizer CD-ROM.
After installation, look at the Release Notes item in the Compaq Array Visualizer program folder. Or you can read the Relnotes.txt file installed in:
\Program Files\ArrayVisualizer
- The HTML Help Viewer documentation, under the title Compaq Array Visualizer.
- The WinHelp documentation for Array Viewer. Use the Help menu in Array Viewer, or click on the file Aviewer.hlp in Windows Explorer (installed in the same directory as Aviewer.exe).
- Debugging Fortran Programs in the online Programmer's Guide, which explains how to use Array Viewer in the debugger. (Professional and Enterprise Editions only.)
- Section 4.7, Redistributing Visual Fortran Files.
7.8 Using the IMSL Libraries (Professional and Enterprise Editions)
The Professional and Enterprise Editions of Visual Fortran include the IMSL Fortran 90 MP Library.
The IMSL libraries are for applications in general applied mathematics and for analyzing and presenting statistical data in scientific and business applications.
Table 7-2 shows the IMSL libraries provided.
For information on the previous version of the IMSL libraries, see the Visual Fortran release notes, described in Section 2.2, Release Notes.
If you perform a Typical installation, the IMSL modules, libraries, include files, message files, and online help are installed, but the sample programs are not. You must perform a Custom installation to install the samples. See Section 3.4.2, Specifying Installation Options and Destination Directories. The samples are installed by default in \Df98\Imsl\Examples.
Note:
If you do not install samples, you can copy the samples folders or files from the Visual Fortran CD-ROM to your hard disk (remove the Read-Only Property of the copied files).
In addition to Visual Fortran platforms (architecture/operating system pairs), IMSL libraries are also available from Visual Numerics for many different platforms.
For more information about IMSL, see:
- The IMSL Fortran 90 MP Library Read Me text file provided in the Compaq Visual Fortran 6 program folder.
- The IMSL Fortran 90 MP Library Help item provided in the Compaq Visual Fortran 6 program folder. This brings up the IMSL documentation in PDF format. (See Section 8.4.4, Location of IMSL PDF Files.)
- Using the IMSL Mathematical and Statistical Libraries in the online Programmer's Guide.
- The Visual Numerics Web page for IMSL at:
http://www.vni.com/products/imsl/7.9 Using f90SQL-lite
f90SQL from Canaima Software is a library of functions and subroutines that makes it possible for Fortran applications to directly read and write data stored in stored in databases. The databases must be compliant with the Open Database Connectivity (ODBC) application programming interface (API).
Examples of database and spreadsheet formats that you can read and write to are: Microsoft Excel, Lotus 1-2-3, Microsoft Access, Microsoft FoxPro, Paradox, Oracle, Sybase, Ingres, Informix, and Microsoft SQL-Server, among others. You can read and write data to the database application's format directly from your Fortran programs, as long as the application offers an ODBC interface to its data files.
f90SQL-lite is a subset of the full f90SQL product, known as f90SQL-pro. f90SQL-lite is suitable for small record sets and a limited number of database connections. You can purchase f90SQL-pro for larger databases from Canaima Software.
f90SQL-lite is provided on the Visual Fortran CD-ROM, but you must install it yourself. See Section 4.16, Installing f90SQL-lite, for details.
Compaq does not provide technical support for f90SQL-lite.
For more information about f90SQL, see:
- The README.TXT and F90SQL.RTF files provided in the F90_SQL directory on the Visual Fortran CD-ROM. (These will be placed on your system during the installation process.)
- The Canaima Software Web site at:
http://www.canaimasoft.com7.10 Using Enterprise Toolkit and Technical Programming Extensions (Enterprise Edition)
The Visual Fortran Enterprise Edition includes the Enterprise Toolkit - UNIX Edition and the Technical Programming Extensions (TPE).
The Enterprise Toolkit lets you build and debug on both Windows and UNIX system platforms using the Visual Fortran interface, combined with 64-bit Compaq Tru64 UNIX compilers. The Enterprise Toolkit also lets you seamlessly build your applications on several other major UNIX operating systems, such as HP-UX, Solaris, and Linux. You can use the Enterprise Toolkit for portable applications that run on Windows and UNIX systems.
The Enterprise Toolkit contains a sample Fortran project showing how to use the product with Fortran.
Technical Programming Extensions is an add-on to the Enterprise Toolkit. TPE includes, among other features:
- Direct access to KAP optimization settings
- The Porting Assistant, a tool to help you port Fortran applications from other vendors to Compaq Fortran for Tru64 UNIX Alpha Systems and Compaq Visual Fortran
For more information, see the Enterprise Toolkit Web site at:
http://www.tru64unix.compaq.com/enterprisetoolkit7.11 Support for COM and Automation Objects: Fortran Module Wizard
Visual Fortran provides a wizard to simplify the use of functionality available with Component Object Model (COM) and Automation (formerly called OLE Automation) objects. COM is an open architecture for cross-platform development of client-server applications, based on object-oriented technology. Automation is a way to manipulate an application's objects from outside the application. Automation is typically used to create applications that expose objects to programming tools and macro languages, create and manipulate one application's objects from other applications, or create tools for accessing and manipulating objects.The Visual Fortran Module Wizard generates Fortran 90 modules that simplify calling COM and Automation services from Fortran programs.
The Fortran Module Wizard automatically generates Fortran source code that simplifies invoking:
- Routines in a dynamic-link library (DLL)
- Methods of an Automation object
- Member functions of a COM object
The generated code includes derived-type data declarations for data structures, procedure interface block definitions, and procedure definitions (external jacket routines) that simplify calling conventions.
For more information, see Using COM and Automation Objects in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format.
7.12 Support for Creating COM Servers (Professional and Enterprise Editions)
COM supports a model of client-server interaction between a user of an object (the client) and the implementor of the object (the server).
Visual Fortran provides a COM server wizard that simplifies the task of creating a COM server or a server that supports dual interfaces. Applications that access COM objects can use the objects exposed by the COM server, including Visual Fortran, Visual C++, and Visual Basic clients.
For information about how to implement the COM server wizard as a Developer Studio add-in, see Section 4.2, Specifying the COM Server Wizard as a Developer Studio Add-in (Professional and Enterprise Editions Only).
For more information, see Creating a COM Server in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format.
7.13 Interface Definitions for Routines
7.13.1 Visual Fortran and Array Visualizer Library Routines
Visual Fortran provides procedure interface definitions to all of the Visual Fortran and Array Visualizer library routines. These interfaces define the properties of a procedure: the specifications of the attributes for a function result, the specification of dummy argument attributes, and the information in the procedure header.
To access the interface definitions, you need to insert a USE statement to include the module file that contains the interface definitions. For example, the following USE statement includes many of the general-purpose Visual Fortran routines:
USE DFLIBOther groups of Visual Fortran routines might require different USE statements, as listed in the description of each routine.
Place the USE statements at the beginning of the program unit before any other statements, such as IMPLICIT NONE or data declarations.
A description of each Visual Fortran routine is listed alphabetically in A to Z Reference in the online Language Reference described in Section 8.2, Documentation Available in HTML Help Viewer Format. Functional groups of routines are also described in various chapters in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format.
The Array Visualizer routines are listed in the online Compaq Array Visualizer HTML Help Viewer documentation, under API Calls for Fortran Programmers, API Calls for C Programmers, and API Calls for C++ Programmers.
7.13.2 CXML and IMSL Routines
The CXML routines require different USE or INCLUDE statements.
The IMSL routines require different USE statements.
Guidelines for calling the CXML and IMSL routines are provided in separate chapters in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format.
Detailed descriptions of the CXML and IMSL routines are provided in separate PDF files. See Section 8.4, Documentation Available in PDF Format.
7.13.3 Win32 Platform SDK Routines
Visual Fortran also provides interface definitions to most of the Win32 Platform SDK (operating system) routines. For example, the USE DFWIN statement includes interfaces for most of the Win32 SDK routines described in the Platform SDK title in the HTML Help Viewer.
These interface definitions simplify the task of calling the Win32 routines, which are intended to be called from C. For more information, see Calling Win32 Routines in the online Programmer's Guide described in Section 8.2, Documentation Available in HTML Help Viewer Format.