introducing compaq visual fortran
TRANSCRIPT
![Page 1: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/1.jpg)
![Page 2: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/2.jpg)
www.compaq.com
IntroducingIntroducing
Compaq Visual FortranCompaq Visual Fortran
![Page 3: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/3.jpg)
CompaqCompaq®® Visual Fortran Visual Fortran
Offers a combination of:Offers a combination of: The robustness and reliability of Compaq’s Fortran The robustness and reliability of Compaq’s Fortran
95 compiler95 compiler The easy-to-use MicrosoftThe easy-to-use Microsoft®®
visual development visual development environmentenvironment
![Page 4: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/4.jpg)
Compaq Visual FortranCompaq Visual Fortran
32-bit Development System for 32-bit Development System for xx86 (Intel86 (Intel®® , AMD, AMD®®, , …) PCs running:…) PCs running: WindowsWindows® ® 20002000 Windows NTWindows NT®® 4 4 Windows 98Windows 98 Windows 95Windows 95
![Page 5: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/5.jpg)
* Previous standards (Fortran 90, FORTRAN 77, FORTRAN IV) are also supported
Compaq Visual FortranCompaq Visual Fortran
The Compaq Fortran CompilerThe Compaq Fortran Compiler Full support of the Fortran 95 Standard*Full support of the Fortran 95 Standard* Compaq Fortran (formerly DIGITALCompaq Fortran (formerly DIGITAL®® Fortran) Fortran) and and
Microsoft Fortran language extensions for easy Microsoft Fortran language extensions for easy code portability among platformscode portability among platforms
![Page 6: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/6.jpg)
Compaq Visual FortranCompaq Visual Fortran
Offers Portability from other PlatformsOffers Portability from other Platforms Microsoft-recommended upgrade for PowerStation Microsoft-recommended upgrade for PowerStation
4.0 users4.0 users Provides a consistent Fortran language dialect Provides a consistent Fortran language dialect
from desktop to mainframe-class systemsfrom desktop to mainframe-class systems Compatible with Fortran code written for other Compatible with Fortran code written for other
Compaq Fortran platforms: Compaq Fortran platforms: – Compaq Tru64Compaq Tru64TMTM UNIX UNIX® ® Alpha Alpha
– LinuxLinux®® Alpha Alpha– OpenVMSOpenVMSTM TM AlphaAlpha
![Page 7: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/7.jpg)
Compaq Visual FortranCompaq Visual Fortran
Microsoft visual development environmentMicrosoft visual development environment Windows-based application developmentWindows-based application development Visual editor with color coded syntax highlightingVisual editor with color coded syntax highlighting Visual debuggerVisual debugger Context-sensitive online documentationContext-sensitive online documentation Same development environment used by Microsoft Same development environment used by Microsoft
Visual C++Visual C++® ® V6V6
![Page 8: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/8.jpg)
Compaq Visual FortranCompaq Visual Fortran
Visual development toolsVisual development tools DebuggerDebugger
Source Code BrowserSource Code Browser
Windows resource editorWindows resource editor
Fortran Module Wizard for working with COM ObjectsFortran Module Wizard for working with COM Objects
Fortran COM Server Wizard for creating COM servers Fortran COM Server Wizard for creating COM servers
(Professional and Enterprise Editions)(Professional and Enterprise Editions)
Graphical viewer for visualizing multi-dimensional Graphical viewer for visualizing multi-dimensional
arrays (Professional and Enterprise Editions)arrays (Professional and Enterprise Editions)
![Page 9: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/9.jpg)
About this demo...About this demo...
This presentation was created using Microsoft This presentation was created using Microsoft PowerPointPowerPoint®® 97 97 To perform the next event To perform the next event
(such as show a line of text or go to the next slide)(such as show a line of text or go to the next slide)– Press the Page-Down keyPress the Page-Down key
– Or press the right arrow keyOr press the right arrow key
![Page 10: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/10.jpg)
The demo is paused while this menu is displayed
About this demo...About this demo...
Slowing down the demoSlowing down the demo To pause the demoTo pause the demo
– Click the right mouse buttonClick the right mouse button
– This menu will appearThis menu will appear
![Page 11: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/11.jpg)
Choosing ‘Advance’ performs the next slide action
‘Reverse’ displays the last slide you viewed
Choosing ‘End Show’ will end the demo
About this demo...About this demo...
![Page 12: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/12.jpg)
Project-based DevelopmentProject-based Development
Visual Fortran organizes application source files Visual Fortran organizes application source files by grouping code, libraries, and windows by grouping code, libraries, and windows resources together in one entity: the resources together in one entity: the projectproject Facilitates Windows and Mixed-Language Facilitates Windows and Mixed-Language
programmingprogramming
![Page 13: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/13.jpg)
A Fortran Console application is atraditional text-oriented interface
that can use most Win32® APIs
To create a new project, click New from the File menu.
The following screen appears, displaying available project types.
Visual Fortran Can Build Visual Fortran Can Build Several Kinds of ProjectsSeveral Kinds of Projects
![Page 14: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/14.jpg)
Visual Fortran Can Build Visual Fortran Can Build Several Kinds of ProjectsSeveral Kinds of Projects
Fortran Windows Applications are GUI applications with full access
to the Win32 APIs
![Page 15: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/15.jpg)
The QuickWin environment provides an easy way to give existing Fortran applications a Windows “look and feel”
Visual Fortran Can Build Visual Fortran Can Build Several Kinds of ProjectsSeveral Kinds of Projects
![Page 16: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/16.jpg)
You can also develop Fortran static and dynamic link libraries
Visual Fortran Can BuildVisual Fortran Can BuildSeveral Kinds of ProjectsSeveral Kinds of Projects
If you have the Microsoft Visual C++ or the Visual Fortran Professional or Enterprise Editions installed, additional project types will be listed (not shown on this screen).
![Page 17: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/17.jpg)
Fortran COM ServerFortran COM Server
With the Professional or Enterprise Editions, you can develop Fortran-based COM Servers
![Page 18: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/18.jpg)
Compaq Visual FortranCompaq Visual Fortran
Visual Fortran is available for Visual Fortran is available for xx86 PC systems running 86 PC systems running Windows NT, Windows 2000, Windows 98, and Windows Windows NT, Windows 2000, Windows 98, and Windows 95 operating systems. Visual Fortran uses the same 95 operating systems. Visual Fortran uses the same development environment on all operating systems:development environment on all operating systems:
– Compiler– Debugger– Source Code Browser– Fortran Module Wizard– Fortran COM Server Wizard– Array Visualizer– Online Documentation
![Page 19: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/19.jpg)
Version 6.5 New FeaturesVersion 6.5 New Features
New Features for Version 6.5: Architecture-specific support for Pentium III, AMD K6, AMD
K6-2/K6-III, and AMD Athlon processors Fortran COM Server project type and Fortran COM Server
Wizard (in Professional and Enterprise Editions) simplify creating Fortran-based COM servers. You can create in-process servers that use custom or dual interfaces
New COM routines COMStringFromGUID and COMIsEqualGUID
New and changed intrinsics:– INT_PTR_KIND returns the KIND for an integer that is large enough
to hold an address– POPCNT, POPPAR, LEADZ, and TRAILZ – Optional KIND argument to LEN, SHAPE, SIZE, LBOUND, and
UBOUND
![Page 20: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/20.jpg)
Version 6.5 New FeaturesVersion 6.5 New Features
New exception handling routines CLEARSTATUSFPQQ and New exception handling routines CLEARSTATUSFPQQ and GETEXCEPTIONPTRSQQ (GETEXCEPTIONPTRSQQ (xx86 systems)86 systems)
New environment variable FORT_CONVERT_New environment variable FORT_CONVERT_extext for for unformatted non-native filesunformatted non-native files
Support added to read nondelimited character strings as Support added to read nondelimited character strings as input for character NAMELIST items input for character NAMELIST items
DLLEXPORT and DLLIMPORT of variables now allow DLLEXPORT and DLLIMPORT of variables now allow export/import of module variables and arrays. export/import of module variables and arrays.
Concurrent-use licensing is now available Concurrent-use licensing is now available Many new sample programsMany new sample programs Faster processing of modules at compile timeFaster processing of modules at compile time
![Page 21: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/21.jpg)
New Features in Version 6New Features in Version 6
In addition to v6.5 new features, earlier Visual In addition to v6.5 new features, earlier Visual Fortran V6 releases included hundreds of new Fortran V6 releases included hundreds of new and improved features, which include:and improved features, which include: Full Fortran 95 Standard support. Full Fortran 95 Standard support. Optional diagnostics flag features deemed Optional diagnostics flag features deemed
"obsolescent" or "deleted" (such features are still "obsolescent" or "deleted" (such features are still supported by the compiler). supported by the compiler).
![Page 22: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/22.jpg)
New Features in Version 6New Features in Version 6 New optimization features can significantly improve New optimization features can significantly improve
application performance over V5, including application performance over V5, including architecture-specific optimizations.architecture-specific optimizations.
Full traceback reporting on severe errors with file Full traceback reporting on severe errors with file names, routine names, and line numbers.names, routine names, and line numbers.
Dialog support now includes modeless dialogs and Dialog support now includes modeless dialogs and additional controls, including ActiveX® controls, additional controls, including ActiveX® controls, progress, tab, and spin controls.progress, tab, and spin controls.
Microsoft's newest visual development environment, Microsoft's newest visual development environment, featuring seamless integration with Microsoft Visual featuring seamless integration with Microsoft Visual C++ V6, makes it easy to develop and debug mixed-C++ V6, makes it easy to develop and debug mixed-language applications.language applications.
![Page 23: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/23.jpg)
New Features in Version 6New Features in Version 6 New Fortran application wizards help you get started New Fortran application wizards help you get started
on new projects. on new projects. You can save Fortran project settings for later use You can save Fortran project settings for later use
when creating new projects of the same project type.when creating new projects of the same project type. Compaq Extended Math Library (CXML) is now Compaq Extended Math Library (CXML) is now
provided, including over 1500 mathematical routines.provided, including over 1500 mathematical routines. Compaq Array Visualizer (in Professional and Compaq Array Visualizer (in Professional and
Enterprise Editions only) provides an interactive Enterprise Editions only) provides an interactive graphic view of your application's array data. graphic view of your application's array data.
![Page 24: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/24.jpg)
New Features in Version 6New Features in Version 6
Traceback ReportingTraceback Reporting When a Fortran program terminates due to a severe When a Fortran program terminates due to a severe
error condition, the Fortran run-time system displays error condition, the Fortran run-time system displays a report of the calling sequence leading to the error. a report of the calling sequence leading to the error. This tabular report contains one line per call stack This tabular report contains one line per call stack frame and includes at least the image name and a frame and includes at least the image name and a hexadecimal program counter (PC) in that image.hexadecimal program counter (PC) in that image.
![Page 25: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/25.jpg)
New Features in Version 6New Features in Version 6
Traceback ReportingTraceback Reporting When you request traceback information during
compilation, the report contains program counter to source file line correlation information in the displayed error message report. The file names, routine names, and line numbers simplify the task of locating the cause of severe run-time errors.
![Page 26: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/26.jpg)
New Features in Version 6New Features in Version 6A traceback report might appear as follows:A traceback report might appear as follows:
The stack frame of real interest is the first frame in image teof.exe, which shows that the error originated in the routine named AGAIN in source module teof.for at line 21
![Page 27: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/27.jpg)
Compaq Extended Math Library (CXML)Compaq Extended Math Library (CXML)
Compaq Extended Math Library (CXML) provides:Compaq Extended Math Library (CXML) provides: Basic Linear Algebra Subprograms (BLAS) libraryBasic Linear Algebra Subprograms (BLAS) library
– Industry-standard Basic Linear Algebra Subprograms, including Level 1 (vector-vector, BLAS1), Level 2 (matrix-vector, BLAS2), and Level 3 (matrix-matrix, BLAS3), BLAS Level 1 Extensions, and Sparse BLAS Level 1.
Signal Processing library Signal Processing library – Provides a basic set of signal processing functions, including one-, two-,
and three-dimensional Fast Fourier Transforms (FFT), group FFTs, Cosine/Sine Transforms (FCT/FST), Convolution, Correlation, and Digital Filters.
Sparse Linear System librarySparse Linear System library– Provides both direct and iterative sparse linear system solvers. The
direct solver package supports both symmetric and nonsymmetric sparse matrices stored using the skyline storage scheme. The iterative solver package contains a basic set of storage schemes, preconditioners, and iterative solvers.
![Page 28: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/28.jpg)
Compaq Extended Math Library (CXML)Compaq Extended Math Library (CXML)
LAPACK subprogramsLAPACK subprograms– 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.
Utility subprogramsUtility subprograms– Provides random number generation, vector math functions, and
sorting subprograms. CXML is also available for other Compaq Fortran Alpha CXML is also available for other Compaq Fortran Alpha
platforms platforms (see (see http://www.compaq.com/mathhttp://www.compaq.com/math)) To call CXML routines from Visual Fortran, add the following To call CXML routines from Visual Fortran, add the following
INCLUDE statement:INCLUDE statement:
INCLUDE 'CXML_INCLUDE.F90’
![Page 29: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/29.jpg)
Main MenuMain Menu
I would like to…I would like to… Learn more about the Microsoft visual Learn more about the Microsoft visual
development environmentdevelopment environment Learn more about mixed language programming Learn more about mixed language programming
and dynamic link librariesand dynamic link libraries Learn more about using COM objects with Visual Learn more about using COM objects with Visual
FortranFortran Learn about Visual Fortran Professional EditionLearn about Visual Fortran Professional Edition Learn about the Compaq Array VisualizerLearn about the Compaq Array Visualizer End the presentationEnd the presentation
![Page 30: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/30.jpg)
Building a Project: qwpaintBuilding a Project: qwpaint
We will now use Compaq Visual Fortran to build We will now use Compaq Visual Fortran to build a Fortran QuickWin application named qwpainta Fortran QuickWin application named qwpaint
This sample application draws simple colored This sample application draws simple colored shapes with the mouseshapes with the mouse
Along the way we’ll be using the Debugger and Along the way we’ll be using the Debugger and Browser to help us fix a problem in our programBrowser to help us fix a problem in our program
Back to Main Menu
![Page 31: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/31.jpg)
Welcome to the visual development environment!
The visual development environment allows you to compile and run your Fortran application with a click of a button
Before we begin, we will customize the visual development environment’s appearance to suit our needs
Back to Main Menu
![Page 32: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/32.jpg)
The toolbars can be repositioned within the visual development environment
Back to Main Menu
![Page 33: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/33.jpg)
Other useful windows can be displayed as well
Back to Main Menu
![Page 34: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/34.jpg)
The Output window displays compile and link errors as well as debugging information
Back to Main Menu
![Page 35: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/35.jpg)
Back to Main Menu
Choose the File | New... menu item to create a new Project
![Page 36: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/36.jpg)
Choose Fortran QuickWin Application as the kind of project to build
Don’t forget to name your project
You can specify in which directory it is placed (or accept the default location)
Back to Main Menu
The “New” dialog box...The “New” dialog box...
![Page 37: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/37.jpg)
In our application, we’ll use multiple windows
Select the Windows interface best suited to your application
Back to Main Menu
![Page 38: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/38.jpg)
Back to Main Menu
The qwpaint project has been opened.
Now we will add somefiles to the project
![Page 39: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/39.jpg)
Use this dialog box to selectthe source files for the project.
Back to Main Menu
Insert Files into a Project...Insert Files into a Project...
![Page 40: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/40.jpg)
The files are listed under Source Files in the Project Window.
To edit a file, double-click its name.
As a default, the editor highlightsFortran keywords in blueand comments in green
Back to Main Menu
![Page 41: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/41.jpg)
Back to Main Menu
Information about the buildwill be displayed here
Clicking the build button or choosing
Build | Build qwpaint.exe willcompile and link this project
After adding files to a project, select each new file in the FileView pane and select Compile from
the Build menu.
![Page 42: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/42.jpg)
It looks like we have a syntax error.
Back to Main Menu
The qwpaint Project requires qwpaint.mod
![Page 43: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/43.jpg)
Double clicking on the error message or pressing F4 brings the editor to the erroneous line
Back to Main Menu
![Page 44: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/44.jpg)
Now that the problem has been fixed, rebuild the project
Back to Main Menu
![Page 45: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/45.jpg)
Oh good, everything built
Let’s run the application
Back to Main Menu
![Page 46: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/46.jpg)
This is what our application looks like
The mouse drawsshapes in this window
Over here, you canadjust the shape
and its color
Back to Main Menu
![Page 47: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/47.jpg)
It looks like we have a bugin our program!
This area should have 16 differentcolored squares.
Like this!
Back to Main Menu
![Page 48: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/48.jpg)
Now we need to debug our program.
The visual development environment makes this easy, though.
Back to Main Menu
![Page 49: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/49.jpg)
But where do we begin?
From this comment, we can guessthat the bug occurs in the
subroutine DrawControlGrid()
Back to Main Menu
![Page 50: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/50.jpg)
We could do a text searchfor DrawControlGrid()...
…but that would be slow andcould become complicatedif we had to search through
a number of files.
We’d like to locateDrawControlGrid()
in the code.
Back to Main Menu
![Page 51: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/51.jpg)
Back to Main Menu
We can use the “Find in Files” tool to search a number
of files for a certain string
![Page 52: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/52.jpg)
The text to search for...
…where to look for the files
Back to Main Menu
““Find in Files…”Find in Files…”
![Page 53: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/53.jpg)
Results of the search are displayed in this window
Back to Main Menu
![Page 54: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/54.jpg)
“Find in Files” finds all occurrences of a given string, but we’d like to know more.
Specifically, we’d like to know where DrawControlGrid() is defined.
Back to Main Menu
![Page 55: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/55.jpg)
For this task we can useVisual Fortran’s
Source Code Browser
Back to Main Menu
![Page 56: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/56.jpg)
Back to Main Menu
To use the source code browser,we need to adjust the project settings
![Page 57: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/57.jpg)
Settings must be changed under the “Fortran” and “Browse Info” tabs
Back to Main Menu
The “Project Settings” dialog box...The “Project Settings” dialog box...
![Page 58: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/58.jpg)
Back to Main Menu
The project settings dialog box also allows you to generate listing and assembly files.
The “Project Settings” dialog box...The “Project Settings” dialog box...
![Page 59: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/59.jpg)
Back to Main Menu
Rebuild your project to generate browser information
…then in the Tools menu choose Source Browser to start browsing
![Page 60: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/60.jpg)
This is the main Browser dialog box
You can browse informationabout any identifier in your source code. We want to know about DrawControlGrid
You can get information about variable declaration and usage, call structure, and file hierarchy.
Back to Main Menu
Since the Fortran language is not case-sensitive, be sure to uncheck the “case-sensitive” check box!
![Page 61: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/61.jpg)
Clicking “OK” brings up this box
This window lists all of theplaces in your code in whichDrawControlGrid() occurs
Double-click on any of theseentries to go to that lineof source code
Back to Main Menu
![Page 62: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/62.jpg)
We want to know where DrawControlGrid is defined.
Back to Main Menu
Double-click on the definition...
![Page 63: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/63.jpg)
…and the Browser takes you right to the code
Back to Main Menu
![Page 64: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/64.jpg)
If we look at the code forDrawControlGrid(), we seethat the grid is drawn here
The function setcolor is calledto change the color
Back to Main Menu
![Page 65: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/65.jpg)
We’d like to know more about the setcolor QuickWin function.
We can use the HTML Help Viewer online documentation to get informationabout setcolor.
Back to Main Menu
![Page 66: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/66.jpg)
and press the F1 key to search the online help.
Click the word we’d liketo know more about...
Back to Main Menu
![Page 67: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/67.jpg)
This dialog box searches the online help.
Click Display to view the help page
Back to Main Menu
![Page 68: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/68.jpg)
A new window opens to allow you to view the online documentation.
Information about functionparameters and return values.
Description of usageand functionality available in
“Remarks”
Back to Main Menu
![Page 69: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/69.jpg)
Links to other online documentation
Many help topics come with example code
Back to Main Menu
![Page 70: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/70.jpg)
You can browse the online helpby clicking on the various topics
Back to Main MenuBack to Main Menu
![Page 71: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/71.jpg)
We think that the bug occurs somewhere in this code
Let’s use the Visual Fortrandebugger to see what
happens during execution
Back to Main Menu
![Page 72: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/72.jpg)
Click this buttonto start debugging
Click the hand toset a breakpoint
at the currentcursor position
Back to Main Menu
![Page 73: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/73.jpg)
The visual development environment has changed into debugging mode
This arrow points to thenext line to be executed
Back to Main Menu
![Page 74: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/74.jpg)
This window allows you to view the values of local variables.
Over here, you can watch thevalue of a certain variable.
Records and arrays canbe viewed in their entirety
with just the click of a button
Back to Main Menu
![Page 75: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/75.jpg)
You can step through theprogram by clicking this icon
Variable values are updated automatically
Back to Main Menu
![Page 76: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/76.jpg)
After some more debugging, we findthe answer to our problem.
By examining the values of i, j, and i2, we determine that the argument to setcolor should be i*4+j not i*4+i
Back to Main Menu
![Page 77: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/77.jpg)
Now that we have changed our source code...
Back to Main Menu
…we can stop
debugging...
..and rebuild
![Page 78: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/78.jpg)
No errors! Let’s run our application
Back to Main Menu
![Page 79: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/79.jpg)
Our problemhas been fixed
Back to Main Menu
![Page 80: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/80.jpg)
Back to Main Menu
Building a Project: qwpaintBuilding a Project: qwpaint
We used Visual Fortran to build an application We used Visual Fortran to build an application that used the QuickWin graphics librariesthat used the QuickWin graphics libraries
The source files were organized using a projectThe source files were organized using a project We used the context-sensitive feature of the We used the context-sensitive feature of the
online documentation online documentation The Browser and Debugger helped us fix a The Browser and Debugger helped us fix a
couple of problems with our programcouple of problems with our program
![Page 81: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/81.jpg)
Main MenuMain Menu
I would like to…I would like to… Learn more about the Microsoft visual Learn more about the Microsoft visual
development environmentdevelopment environment Learn more about mixed language programming Learn more about mixed language programming
and dynamic link librariesand dynamic link libraries Learn more about using COM objects with Visual Learn more about using COM objects with Visual
FortranFortran Learn about Visual Fortran Professional EditionLearn about Visual Fortran Professional Edition Learn about the Compaq Array VisualizerLearn about the Compaq Array Visualizer End the presentationEnd the presentation
![Page 82: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/82.jpg)
Back to Main Menu
Building a DLLBuilding a DLL
Functions in dynamic-link libraries (DLLs) are not Functions in dynamic-link libraries (DLLs) are not loaded until they are called at run-timeloaded until they are called at run-time
Using DLLs reduces the size of executables and Using DLLs reduces the size of executables and modularizes source codemodularizes source code
![Page 83: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/83.jpg)
Back to Main Menu
Building a DLLBuilding a DLL
We will now use Visual Fortran to construct a We will now use Visual Fortran to construct a DLLDLL
The DLL will be written using fixed-source form The DLL will be written using fixed-source form syntax, but its functions will be called in programs syntax, but its functions will be called in programs written in Fortran 95 and C++written in Fortran 95 and C++
Even though Microsoft Visual C++ 6 is purchased Even though Microsoft Visual C++ 6 is purchased separately from Visual Fortran, both products separately from Visual Fortran, both products share the same development environment!share the same development environment!
![Page 84: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/84.jpg)
Back to Main Menu
Building a DLLBuilding a DLL
Our application will be called spline because our Our application will be called spline because our DLL contains functions that perform a spline DLL contains functions that perform a spline analysis on dataanalysis on data
spline also introduces the concept of visual spline also introduces the concept of visual development environment workspaces. development environment workspaces. Workspaces allow several projects to be grouped Workspaces allow several projects to be grouped together.together.
![Page 85: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/85.jpg)
Back to Main Menu
Building a DLLBuilding a DLL
spline demonstrates mixed language spline demonstrates mixed language programming using Visual Fortran and Visual C+programming using Visual Fortran and Visual C+++ Installing Visual C++ adds options to the visual Installing Visual C++ adds options to the visual
development environment that are not applicable to development environment that are not applicable to Visual FortranVisual Fortran– Different kinds of Projects to buildDifferent kinds of Projects to build
– C++ toolsC++ tools
![Page 86: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/86.jpg)
Back to Main Menu
Building a DLLBuilding a DLL
The spline Workspace consists of three Projects:The spline Workspace consists of three Projects: splinedll - a DLL containing routines that perform a splinedll - a DLL containing routines that perform a
spline analysis on dataspline analysis on data splineqw - a Visual Fortran QuickWin application splineqw - a Visual Fortran QuickWin application
that calls routines in splinedll.dllthat calls routines in splinedll.dll splinevc - a Visual C++ program that uses the splinevc - a Visual C++ program that uses the
routines in splinedll.dllroutines in splinedll.dll
![Page 87: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/87.jpg)
To create a new workspace,choose File | New...
Back to Main Menu
![Page 88: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/88.jpg)
We’ll create a Fortran Dynamic Link Library project...
…called splinedll...
…and simultaneously create a workspace for our project
Back to Main Menu
![Page 89: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/89.jpg)
…and click “Finish”...
Back to Main Menu
Choose “an empty DLL application” in the app-wizard dialogue...
![Page 90: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/90.jpg)
The App Wizard creates an empty workspace for our project.
Let’s add some files to the splinedll project
Back to Main Menu
![Page 91: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/91.jpg)
Insert the spline.for fileinto the splinedll project
Back to Main Menu
![Page 92: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/92.jpg)
The visual development environment editor formats itself for editing fixed-form Fortran source code
spline.for contains two functions,SplineCalculate() and SplineEvaluate(),
which determine the spline curve
Back to Main Menu
![Page 93: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/93.jpg)
Back to Main Menu
Build the DLL just like you would any other
project
![Page 94: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/94.jpg)
Now we’re going to build splineqw, a Fortran QuickWin program
that uses splinedll.dll
--------------------Configuration: spldll - Win32 Debug--------------------spline.dll - 0 error(s), 0 warning(s)
Back to Main Menu
![Page 95: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/95.jpg)
We’ll create a Fortran Quick Win project...
…called splineqw...
…and include it into our current workspace
Back to Main Menu
![Page 96: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/96.jpg)
Choose the windowing options that best suit your application
And the Wizard inserts the new project into your workspace
Select the Windows interface that best suits your application
Back to Main Menu
![Page 97: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/97.jpg)
Now that we’ve created the splineqw project...
…we’ll add some files to it
Back to Main Menu
![Page 98: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/98.jpg)
Be sure to insert it into the correct project
Locate the file you wish to insert
Back to Main Menu
![Page 99: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/99.jpg)
Fspline.f90 uses the QuickWin graphics library to draw a spline curve that fits some data points
Back to Main Menu
![Page 100: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/100.jpg)
Before we can build Splineqw.exe, we have to link in file splinedll.lib
We can do that by adding the (relative) path here in the Project settings dialog
Back to Main Menu
Instead of adding the link path, you can add the splinedll.lib file to the project by using the Add to Project … Files item in the Project menu
![Page 101: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/101.jpg)
Before we can run splineqw.exe, we must be sure that the system can find splinedll.dll
The simplest way to assure this is to physically move (or copy) splinedll.dll into the directory which contains our executable file, splineqw.exe
Back to Main Menu
![Page 102: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/102.jpg)
Build splineqw.exe
Back to Main Menu
![Page 103: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/103.jpg)
In splineqw the user clicks on a window and a spline curve is displayed that best fits the clicked points
Back to Main Menu
![Page 104: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/104.jpg)
Next we’ll use Visual C++ to build a new Windows application that uses splinedll.dll
We can perform mixed-language programming using Visual Fortran and Visual C++ in the same development environment
Back to Main Menu
![Page 105: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/105.jpg)
We’ll create a Visual C++ Win32 application
…called splinevc...
…and include it into our current workspace
Back to Main Menu
![Page 106: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/106.jpg)
Choose to build an empty project...
…and the AppWizard finishes the job
Back to Main Menu
![Page 107: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/107.jpg)
Splinevc uses the Microsoft Foundation Classes to create a user interface
Back to Main Menu
![Page 108: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/108.jpg)
We must specify that we are using the Microsoft Foundation Classes under Project Settings
Back to Main Menu
![Page 109: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/109.jpg)
Instead of adjusting the link settings, splinedll.lib can be added directly to the project!
Back to Main Menu
![Page 110: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/110.jpg)
Before you attempt to build any project, make sure it is set as the Active Project
Back to Main Menu
![Page 111: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/111.jpg)
Now we are ready to build splinevc.exe Splinevc runs similarly
to splineqw
Back to Main Menu
![Page 112: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/112.jpg)
The MFC application has a different look to it...
…but it performs the same task
Back to Main Menu
![Page 113: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/113.jpg)
Back to Main Menu
Building a DLLBuilding a DLL
We used Visual Fortran to build a dynamic link We used Visual Fortran to build a dynamic link library that contained functions to perform a library that contained functions to perform a spline analysisspline analysis
Within the same Workspace we built two Within the same Workspace we built two applications that used the DLL: one written in applications that used the DLL: one written in Fortran and the other in C++Fortran and the other in C++
![Page 114: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/114.jpg)
Main MenuMain Menu
I would like to…I would like to… Learn more about the Microsoft visual Learn more about the Microsoft visual
development environmentdevelopment environment Learn more about mixed language programming Learn more about mixed language programming
and dynamic link librariesand dynamic link libraries Learn more about using COM objects with Visual Learn more about using COM objects with Visual
FortranFortran Learn about Visual Fortran Professional EditionLearn about Visual Fortran Professional Edition Learn about the Compaq Array VisualizerLearn about the Compaq Array Visualizer End the presentationEnd the presentation
![Page 115: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/115.jpg)
Back to Main Menu
Working with COM ObjectsWorking with COM Objects
Many windows applications provide a means of Many windows applications provide a means of accessing their functionality from another accessing their functionality from another programprogram
The Component Object Model (COM) is one such The Component Object Model (COM) is one such mechanismmechanism
![Page 116: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/116.jpg)
Back to Main Menu
Working with COM ObjectsWorking with COM Objects
COM is a language independent object model COM is a language independent object model designed for application interactiondesigned for application interaction But the Fortran language does not support objectsBut the Fortran language does not support objects
The Visual Fortran Module Wizard allows you to The Visual Fortran Module Wizard allows you to integrate COM objects into your Fortran integrate COM objects into your Fortran application developmentapplication development
![Page 117: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/117.jpg)
Back to Main Menu
Working with COM ObjectsWorking with COM Objects
The Module Wizard creates Fortran module files The Module Wizard creates Fortran module files that provide an interface to functions used to that provide an interface to functions used to access COM objectsaccess COM objects The Fortran Module Wizard helps you create The Fortran Module Wizard helps you create
Fortran applications (clients) that use existing COM Fortran applications (clients) that use existing COM or Automation serversor Automation servers
The Professional and Enterprise editions include The Professional and Enterprise editions include the ability to create an in-process COM server the ability to create an in-process COM server (described in the section Visual Fortran (described in the section Visual Fortran Professional Edition).Professional Edition).
![Page 118: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/118.jpg)
Back to Main Menu
Working with COM ObjectsWorking with COM Objects
We will now build a Console application that uses We will now build a Console application that uses the Module Wizard to access a COM Objectthe Module Wizard to access a COM Object
dlines uses the visual development environment dlines uses the visual development environment itself to modify a Fortran source fileitself to modify a Fortran source file Replaces “debug characters” in column 1 with Replaces “debug characters” in column 1 with
conditional compilation IF DEFINED directivesconditional compilation IF DEFINED directives
![Page 119: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/119.jpg)
Back to Main Menu
Working with COM ObjectsWorking with COM Objects
dlines calls COM routines from Developer Studio dlines calls COM routines from Developer Studio that:that: Start the visual development environment runningStart the visual development environment running Open a file within the visual development Open a file within the visual development
environmentenvironment Perform editing functions on the open filePerform editing functions on the open file
– replace text, go to the next line, etc.replace text, go to the next line, etc. Save the fileSave the file Close the applicationClose the application
![Page 120: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/120.jpg)
First we need to make a new Project
Back to Main Menu
![Page 121: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/121.jpg)
New Fortran Console Application
Named dlines
Back to Main Menu
![Page 122: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/122.jpg)
Choose to build an empty project...
…and the AppWizard finishes the job
Back to Main Menu
![Page 123: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/123.jpg)
Now let’s use the Module Wizard to create the interface to the visual development environment’s COM functions
Choose Fortran Module Wizard from the Tools menu
Back to Main Menu
![Page 124: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/124.jpg)
We’ll be getting informationfrom a COM interface
Our Fortran module will be named dsapp
Back to Main Menu
The Visual Fortran Module WizardThe Visual Fortran Module Wizard
![Page 125: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/125.jpg)
Use the Visual C++
Shared Objects
You can specify whichCOM Interfaces you
want access to
Back to Main Menu
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\MSDEV98\BIN\DEVSHL.DLL (Visual C++ Shared Objects)C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\MSDEV98\BIN\DEVSHL.DLL (Visual C++ Shared Objects)
The Visual Fortran Module WizardThe Visual Fortran Module Wizard
![Page 126: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/126.jpg)
Might as well have accessto all of the COM InterfacesGenerate the Fortran
module file
Back to Main Menu
The Visual Fortran Module WizardThe Visual Fortran Module Wizard
![Page 127: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/127.jpg)
You can specify the name of the source file containing
the Fortran modules
Back to Main Menu
The Visual Fortran Module WizardThe Visual Fortran Module Wizard
![Page 128: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/128.jpg)
We’ll repeat the process for another DeveloperStudio COM Object
This module willbe called ds_text
Back to Main Menu
The Visual Fortran Module WizardThe Visual Fortran Module Wizard
![Page 129: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/129.jpg)
…select all of the COM Interfaces as before...
…generate the Fortran module file and save it
as dstext.f90
Using the Visual C++
Text Editor this time...
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\MSDEV98\BIN\DEVEDIT.PKG (Visual C++ Text Editor)C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\MSDEV98\BIN\DEVEDIT.PKG (Visual C++ Text Editor)
Back to Main Menu
![Page 130: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/130.jpg)
Back to Main Menu
Add the files generated by the Module Wizard to the dlines project
![Page 131: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/131.jpg)
dsapp.f90 was generated by the Fortran Module Wizard
Back to Main Menu
This is an INTERFACE to the function IGenericDocument_Save(), which saves
the file open in the visual text editor
![Page 132: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/132.jpg)
Let’s add these sample files which are located in your samples\advanced\com\dlines directory
Back to Main Menu
![Page 133: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/133.jpg)
These two files make use of theinterfaces in dsapp and dstext
Back to Main Menu
![Page 134: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/134.jpg)
… $IGenericDocument_Save() is called to save the changes
After other COM functions are calledto modify the Fortran source file...
Back to Main Menu
Now, let’s take a look at the program in action
![Page 135: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/135.jpg)
This Fortran fixed-format file contains lines beginning with
the letters ‘D’ and ‘E’.
We’ll use dlines to change the‘E’ debug lines to preprocessed
IF DEFINED statements
Visual Fortran allows only“Debug Lines” that start with ‘D’
Back to Main Menu
[Mbcomp.for]
Execute the program
![Page 136: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/136.jpg)
Specify the file on which to operate*
The debug character and the IF DEFINED variable
to replace it with
Back to Main Menu
• Remember to use quotation marks when typing DOS pathnames that contain spaces
dlines.exedlines.exe
![Page 137: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/137.jpg)
The ‘E’ debug lines have been
replaced with conditionalcompilation IF DEFINED
directives
Back to Main Menu
Mbcomp2.for *
![Page 138: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/138.jpg)
Back to Main Menu
Working with COM ObjectsWorking with COM Objects
dlines made use of functions that are a part of a dlines made use of functions that are a part of a Component Object Model ObjectComponent Object Model Object
The Visual Fortran Module Wizard was used to The Visual Fortran Module Wizard was used to create a Fortran module file that allowed dlines to create a Fortran module file that allowed dlines to interact with Developer Studiointeract with Developer Studio
dlines used functions that are a part of the visual dlines used functions that are a part of the visual development environment to edit a Fortran development environment to edit a Fortran source filesource file
![Page 139: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/139.jpg)
Main MenuMain Menu
I would like to…I would like to… Learn more about the Microsoft visual Learn more about the Microsoft visual
development environmentdevelopment environment Learn more about mixed language programming Learn more about mixed language programming
and dynamic link librariesand dynamic link libraries Learn more about using COM objects with Visual Learn more about using COM objects with Visual
FortranFortran Learn about Visual Fortran Professional EditionLearn about Visual Fortran Professional Edition Learn about the Compaq Array VisualizerLearn about the Compaq Array Visualizer End the presentationEnd the presentation
![Page 140: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/140.jpg)
Back to Main Menu
Visual Fortran Professional EditionVisual Fortran Professional Edition
In addition to the Standard Edition, a Professional In addition to the Standard Edition, a Professional Edition is available that includes:Edition is available that includes: The complete visual development environmentThe complete visual development environment IMSL numerical librariesIMSL numerical libraries Fortran COM Server Wizard and project typeFortran COM Server Wizard and project type Compaq Array VisualizerCompaq Array Visualizer
The Enterprise Edition includes the Professional The Enterprise Edition includes the Professional Edition software, plus other software that lets you Edition software, plus other software that lets you use Visual Fortran (on a PC) to develop use Visual Fortran (on a PC) to develop applications for Compaq Tru64 UNIX and other applications for Compaq Tru64 UNIX and other UNIX systems. UNIX systems.
![Page 141: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/141.jpg)
Back to Main Menu
Visual Fortran Professional EditionVisual Fortran Professional Edition
The Visual NumericsThe Visual Numerics®® IMSL numerical libraries provide IMSL numerical libraries provide over 900 Fortran routines for performing advanced over 900 Fortran routines for performing advanced mathematical algorithmsmathematical algorithms
Applied mathematicsApplied mathematics Statistical functionsStatistical functions Helper functions for printing, etc.Helper functions for printing, etc.
IMSL libraries are available for many other OS/architecture IMSL libraries are available for many other OS/architecture platforms (see http://www.vni.com) platforms (see http://www.vni.com)
To call IMSL routines from Visual Fortran, add the To call IMSL routines from Visual Fortran, add the following USE statement:following USE statement:
USE Numerical_librariesUSE Numerical_libraries
![Page 142: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/142.jpg)
Back to Main Menu
Visual Fortran Professional EditionVisual Fortran Professional Edition
IMSL General Mathematics libraryIMSL General Mathematics library Solving Linear SystemsSolving Linear Systems Matrix and vector manipulation Matrix and vector manipulation Eigenvalues and eigenvectorsEigenvalues and eigenvectors Integration and differentiationIntegration and differentiation Differential equationsDifferential equations TransformsTransforms Printing, sorting, and other utilitiesPrinting, sorting, and other utilities
![Page 143: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/143.jpg)
Back to Main Menu
Visual Fortran Professional EditionVisual Fortran Professional Edition
IMSL Statistics LibraryIMSL Statistics Library Basic statistics, regression, correlationBasic statistics, regression, correlation Analysis of varianceAnalysis of variance Covariant structures and factor analysisCovariant structures and factor analysis Multidimensional scalingMultidimensional scaling Density and hazard estimationDensity and hazard estimation Functions for printing console-based charts and Functions for printing console-based charts and
graphs (histogram, scatter, etc.)graphs (histogram, scatter, etc.)
![Page 144: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/144.jpg)
Back to Main Menu
IMSL Library ExampleIMSL Library Example
We will now build a Fortran Console application We will now build a Fortran Console application that uses a couple of the IMSL statistics routinesthat uses a couple of the IMSL statistics routines
mnrain.exe plots some data in a vertical mnrain.exe plots some data in a vertical histogramhistogram The data is the average precipitation in Minnesota The data is the average precipitation in Minnesota
in the month of Marchin the month of March
![Page 145: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/145.jpg)
Back to Main Menu
IMSL Library ExampleIMSL Library Example
This sample program comes from the IMSL This sample program comes from the IMSL online documentation online documentation
After looking at the online documentation, we will After looking at the online documentation, we will build a Visual Fortran projectbuild a Visual Fortran project
![Page 146: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/146.jpg)
The IMSL libraries come with extensive online documentation as well as a number of example programs
Back to Main Menu
![Page 147: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/147.jpg)
In the contents, click Appendix B, Alphabetic Summary of Routines. Locate VHSTP.
The VHSTP routine is in Volume 2, so open the file STATVOL2.
Back to Main Menu
![Page 148: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/148.jpg)
The IMSL documentation offersinformation about the routine’s
usage and arguments
Back to Main Menu
![Page 149: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/149.jpg)
This sample program calls VHSTP to draw a vertical
histogram of some data
Let’s build this exampleprogram using Visual Fortran
It also uses another IMSLroutine, OWFRQ, to
tabulate the data
Back to Main Menu
![Page 150: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/150.jpg)
Back to Main Menu
Copy the program text from the online help into a Visual Fortran source file. In the Edit menu: 1. Click Select All. 2. Click Copy
Back to Main Menu
![Page 151: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/151.jpg)
Now we need to add the source code to our project
So, we’ll create an emptyFortran source file
Back to Main Menu
We’ve made a Fortran Console Application and named it mnrain
mnrain - Compaq Visual Fortran
![Page 152: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/152.jpg)
We want to make a new File...
We want it to be Fixed Format (.for)
Add it to the currentproject (mnrain)
…named mnrain.for
Back to Main MenuBack to Main Menu
![Page 153: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/153.jpg)
Back to Main Menu
Now, we’ll paste the IMSL example into mnrain.for
mnrain.for is open in the editor
and has been added to the project
mnrain - Compaq Visual Fortran
![Page 154: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/154.jpg)
Back to Main Menu
After we paste in the text from the IMSL documentation file, edit the text to fit in fixed format:
1. Add the line: USE Numerical_Libraries 2. Comment out the line containing EXTERNAL 3. Change the single quote characters to ASCII single quotation marks 4. Remove extra non-source text
![Page 155: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/155.jpg)
Back to Main Menu
Let’s compile this file to check for errors.
![Page 156: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/156.jpg)
Now let’s build and execute the application
Back to Main Menu
![Page 157: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/157.jpg)
By calling two IMSL library routines,our data was tabulated and displayed
in this histogram
Back to Main Menu
mnrain.exemnrain.exe
![Page 158: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/158.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
Visual Fortran (all editions) provides the Fortran Module Wizard Visual Fortran (all editions) provides the Fortran Module Wizard to help generate code needed to use COM and Automation to help generate code needed to use COM and Automation objects (Fortran client applications).objects (Fortran client applications).
Visual Fortran Professional and Enterprise Editions also provide Visual Fortran Professional and Enterprise Editions also provide the ability to create a Fortran COM server.the ability to create a Fortran COM server.
The Fortran COM Server Wizard helps you generate a Fortran The Fortran COM Server Wizard helps you generate a Fortran application that creates a COM server or a server that supports application that creates a COM server or a server that supports dual interfaces. The initial implementation in V6.5 supports only dual interfaces. The initial implementation in V6.5 supports only in-process servers, loaded into the client's process.in-process servers, loaded into the client's process.
COM is language independent, so clients can be created by COM is language independent, so clients can be created by Visual Basic, Visual C++, Visual Fortran, and other tools that Visual Basic, Visual C++, Visual Fortran, and other tools that support COM.support COM.
COM servers are reusable components, so multiple client COM servers are reusable components, so multiple client applications can use the server.applications can use the server.
Back to Main Menu
![Page 159: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/159.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
Creating a Fortran COM Server consists of these steps:Creating a Fortran COM Server consists of these steps: Create a Fortran COM Server project. This includes specifying a Create a Fortran COM Server project. This includes specifying a
class name, interface name, and derived-type name. Select the class name, interface name, and derived-type name. Select the Fortran COM Server project type when creating the project. Fortran COM Server project type when creating the project.
Use the Fortran COM Server Wizard to define the interface(s) Use the Fortran COM Server Wizard to define the interface(s) defined by the class, including the methods, properties, and defined by the class, including the methods, properties, and the arguments for each interface. the arguments for each interface.
When you build the project, the Fortran COM Server Wizard When you build the project, the Fortran COM Server Wizard generates code. You need to modify the source files by adding generates code. You need to modify the source files by adding code to supply the implementation of the methods.code to supply the implementation of the methods.
Test the Fortran COM server, by creating one or more clients to Test the Fortran COM server, by creating one or more clients to access the server.access the server.
Deploy the Fortran COM server. Deploy the Fortran COM server.
Back to Main Menu
![Page 160: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/160.jpg)
After you create the Fortran COM Server project, you specify a Class name, Class derived-type name, and Interface name.
When you click OK, the Fortran COM Server Wizard appears:The Fortran COM Server Wizard helps you
define the interface's methods, properties, and their arguments.
Creating Fortran COM ServersCreating Fortran COM Servers
Back to Main Menu
The left pane shows the COM server hierarchy.
The right pane shows the properties of the currently selected item (in this case the COM Server Adder)
![Page 161: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/161.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
Back to Main Menu
Choose whether a COM or dual interface is needed
Adder is the COM server and also the project nameAddingMachine is the class nameIAdd is the interface name (interface names start with I)AddingMachine_Instance is the Class derived-type name
Expand the + signs and click Iadd to display the interface properties
![Page 162: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/162.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
To add Clear and Add methods for the IAdd interface:To add Clear and Add methods for the IAdd interface: 1. Select the IAdd interface 2. Click New 3. Select Method, type in Clear, and click OK 4. Repeat steps 1-3, specifying the name Add 5. Select the Add method 6. Click New 7. Select Argument, type in Operand, and click OK 8. Specify the Fortran data type as REAL(4) 9. Let's assume you are done, so click Save
![Page 163: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/163.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
Back to Main Menu
![Page 164: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/164.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
Back to Main Menu
In the FileView pane, expand the + next to Adder files and Source Files folders.
The TODO.TXT file informs you of changes made to your project by the Wizard, and lets you know when you need to make changes.
Once you click Save, your project appears.
![Page 165: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/165.jpg)
Creating Fortran COM ServersCreating Fortran COM Servers
You need to modify the source files after lines that You need to modify the source files after lines that start with ! TODO..., build the project, and then use start with ! TODO..., build the project, and then use one of the clients to test the server.one of the clients to test the server.
To activate the COM Server Wizard later, open your To activate the COM Server Wizard later, open your Fortran COM Server project and click Fortran COM Fortran COM Server project and click Fortran COM Server Wizard in the View menu.Server Wizard in the View menu.
For more information, see:For more information, see: The Creating a COM Server chapter in the online
Programmers Guide. The Adder sample in ...Samples\Advanced\COM\Adder,
which contains Visual C++ and Visual Fortran clients as subprojects.
Back to Main Menu
![Page 166: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/166.jpg)
Back to Main Menu
Visual Fortran Professional EditionVisual Fortran Professional Edition
The Professional Edition includes the IMSL numerical The Professional Edition includes the IMSL numerical libraries, Fortran COM Server Wizard, and the libraries, Fortran COM Server Wizard, and the Compaq Array Visualizer. The Array Visualizer is Compaq Array Visualizer. The Array Visualizer is discussed in the next section.discussed in the next section.
The Visual Fortran Enterprise Edition includes the The Visual Fortran Enterprise Edition includes the Visual Fortran Professional Edition, plus other Visual Fortran Professional Edition, plus other software that lets you use Visual Fortran on your software that lets you use Visual Fortran on your xx86 86 PC system to develop applications for Compaq Tru64 PC system to develop applications for Compaq Tru64 UNIX, and other UNIX and Linux systems. The UNIX, and other UNIX and Linux systems. The Enterprise Edition has a separate slide show.Enterprise Edition has a separate slide show.
![Page 167: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/167.jpg)
Main MenuMain Menu
I would like to…I would like to… Learn more about the Microsoft visual Learn more about the Microsoft visual
development environmentdevelopment environment Learn more about mixed language programming Learn more about mixed language programming
and dynamic link librariesand dynamic link libraries Learn more about using COM objects with Visual Learn more about using COM objects with Visual
FortranFortran Learn about Visual Fortran Professional EditionLearn about Visual Fortran Professional Edition Learn about the Compaq Array VisualizerLearn about the Compaq Array Visualizer End the presentationEnd the presentation
![Page 168: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/168.jpg)
Back to Main Menu
The Compaq Array VisualizerThe Compaq Array Visualizer
Compaq Visual Fortran Professional and Compaq Visual Fortran Professional and Enterprise Editions are equipped with the Enterprise Editions are equipped with the Compaq Array VisualizerCompaq Array Visualizer
The Array Visualizer uses ActiveX technology to The Array Visualizer uses ActiveX technology to visualize multi-dimensional arrays of data visualize multi-dimensional arrays of data generated by Visual Fortran programsgenerated by Visual Fortran programs
![Page 169: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/169.jpg)
Back to Main Menu
The Compaq Array VisualizerThe Compaq Array Visualizer
The Compaq Array Visualizer can be:The Compaq Array Visualizer can be: Run as a standalone program called Array ViewerRun as a standalone program called Array Viewer Controlled by your Visual Fortran or Visual C++ Controlled by your Visual Fortran or Visual C++
applicationapplication Embedded as an ActiveX control within a Visual Embedded as an ActiveX control within a Visual
Fortran, Visual C++, or Visual BasicFortran, Visual C++, or Visual Basic®® application application Used in conjunction with the visual development Used in conjunction with the visual development
environment to view large arrays while debuggingenvironment to view large arrays while debugging
![Page 170: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/170.jpg)
Back to Main Menu
The Compaq Array VisualizerThe Compaq Array Visualizer
Compaq Visual Fortran Professional and Compaq Visual Fortran Professional and Enterprise Editions give you full access to the Enterprise Editions give you full access to the power of the Array Visualizerpower of the Array Visualizer Build Applications that interact with the Array Build Applications that interact with the Array
VisualizerVisualizer Use the Array Visualizer to view large multi-Use the Array Visualizer to view large multi-
dimensional arrays while debuggingdimensional arrays while debugging
![Page 171: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/171.jpg)
Back to Main Menu
The Compaq Array VisualizerThe Compaq Array Visualizer
The Array Visualizer interacts with other The Array Visualizer interacts with other programs:programs: As an embedded ActiveX control in Visual Fortran, As an embedded ActiveX control in Visual Fortran,
Visual C++, and Visual Basic applicationsVisual C++, and Visual Basic applications Operated via a simple set of function calls in C and Operated via a simple set of function calls in C and
Fortran programsFortran programs
![Page 172: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/172.jpg)
Back to Main Menu
The Compaq Array VisualizerThe Compaq Array Visualizer
In the following slides we will see the Array In the following slides we will see the Array Visualizer at workVisualizer at work Rendering 3D graphs of array dataRendering 3D graphs of array data Being controlled by a Visual Fortran ProgramBeing controlled by a Visual Fortran Program
![Page 173: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/173.jpg)
Back to Main Menu
The data in the array are
displayed in this grid
This pane contains a graphical view of the data
The Compaq Array ViewerThe Compaq Array Viewer
![Page 174: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/174.jpg)
Clicking here brings up the color bar
Back to Main Menu
![Page 175: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/175.jpg)
The data in the array are plotted along the z-axis
Each z-value is assigned a color
The name and the type of the array are shown here
Back to Main Menu
![Page 176: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/176.jpg)
Back to Main Menu
The red marker is used to
indicate the current array
element
Double-clicking on the graph will update the marker and grid
accordingly
![Page 177: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/177.jpg)
Notice the new position of the marker on the color
bar
The current array element is listed here
Back to Main Menu
![Page 178: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/178.jpg)
You can rotate the graph using the
mouse
Just click and drag...
Back to Main Menu
![Page 179: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/179.jpg)
The Compaq Array Viewer can open array data files
Back to Main Menu
![Page 180: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/180.jpg)
In addition, you can “zoom in” on a
specific region of the graph...
…and customize the colors and scaling factors used in the
graph.
Back to Main Menu
![Page 181: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/181.jpg)
The Compaq Array Visualizer allows you to create a Visual
Fortran application that uses the Array Viewer.
Back to Main Menu
![Page 182: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/182.jpg)
A set of Array Visualizer Fortran routines lets your application control the action of the Array Viewer.
Back to Main Menu
![Page 183: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/183.jpg)
This Array Visualizer program displays an array using the Array Viewer... …makes some changes
to the array...
…and displays the modified result.
Back to Main Menu
![Page 184: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/184.jpg)
In Visual Fortran Professional and Enterprise Editions, the Array Viewer
can be used inside the debugger!
Back to Main Menu
![Page 185: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/185.jpg)
Back to Main Menu
Then click the Array Viewer icon
Simple 2- Compaq Visual Fortran [break]
To view an array while debugging, highlight the
variable name
![Page 186: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/186.jpg)
This array is supposed to store sin(x) over the range 1 to 40
Clearly, something is wrong!
Back to Main Menu
![Page 187: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/187.jpg)
Using the Array Viewer, you can easily recognize
inconsistencies in large sets of data
Back to Main Menu
![Page 188: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/188.jpg)
Back to Main Menu
The Compaq Array VisualizerThe Compaq Array Visualizer
Visual Fortran Professional and Enterprise Visual Fortran Professional and Enterprise Editions give you the full power of the Array Editions give you the full power of the Array VisualizerVisualizer Debug programs using the Array ViewerDebug programs using the Array Viewer Write Fortran or C programs to control the Array Write Fortran or C programs to control the Array
ViewerViewer Use the Avis2d ActiveX control to control the Array Use the Avis2d ActiveX control to control the Array
Viewer graphing modes and appearanceViewer graphing modes and appearance Use the Avis Grid ActiveX control to create tables Use the Avis Grid ActiveX control to create tables
of array dataof array data
![Page 189: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/189.jpg)
Main MenuMain Menu
I would like to…I would like to… Learn more about Microsoft visual development Learn more about Microsoft visual development
environmentenvironment Learn more about mixed language programming Learn more about mixed language programming
and dynamic link librariesand dynamic link libraries Learn more about using COM objects with Visual Learn more about using COM objects with Visual
FortranFortran Learn about Visual Fortran Professional EditionLearn about Visual Fortran Professional Edition Learn about the Compaq Array ViewerLearn about the Compaq Array Viewer End the presentationEnd the presentation
![Page 190: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/190.jpg)
www.compaq.com
Compaq Visual FortranCompaq Visual FortranThank You for Viewing theThank You for Viewing the
Compaq Visual Fortran Version 6.5Compaq Visual Fortran Version 6.5
Product OverviewProduct Overview
![Page 191: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/191.jpg)
Compaq, DIGITAL, and the Compaq logo are registered in the U.S. Patent and Trademark office.
OpenVMS and Tru64 UNIX are trademarks of Compaq Information Technologies, L.C.
ActiveX, Microsoft, MS, Microsoft Developer Studio, NT, PowerPoint, Visual Basic, Visual C++, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries.
Intel and Pentium are registered trademarks of Intel Corporation.AMD and Athlon are trademarks of Advanced Micro Devices, Inc. IMSL and Visual Numerics are registered trademarks of Visual Numerics, Inc. UNIX and The Open Group are trademarks of The Open Group.All other trademarks and registered trademarks are the property of their
respective holders.
Visual FortranVisual Fortran
![Page 192: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/192.jpg)
www.compaq.com
Compaq Visual FortranCompaq Visual Fortran
Compaq Visual Fortran OverviewCompaq Visual Fortran Overview
© 1997-2000 Compaq Computer Corporation.© 1997-2000 Compaq Computer Corporation.
For more information about Compaq Fortran For more information about Compaq Fortran please visit our web site at: please visit our web site at:
http://www.compaq.com/http://www.compaq.com/fortranfortran
Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is subject to change without notice.
![Page 193: Introducing Compaq Visual Fortran](https://reader036.vdocuments.mx/reader036/viewer/2022081419/56649da25503460f94a8e68d/html5/thumbnails/193.jpg)
www.compaq.com