1 Introduction to the Programmer's Guide
- 1.1 Programmer's Guide Conventions
2 Building Programs and Libraries
- 2.1 Overview of Building Projects
- 2.1.1 How Information is Displayed
- 2.1.2 Menu Options
- 2.1.3 Using the Shortcut Menu
- 2.2 Types of Projects
- 2.2.1 Fortran Console Application Projects
- 2.2.2 Fortran Standard Graphics Application Projects
- 2.2.3 Fortran QuickWin Application Projects
- 2.2.4 Fortran Windows Application Projects
- 2.2.5 Fortran Static Library Projects
- 2.2.6 Fortran Dynamic-Link Library Projects
- 2.3 Defining Your Project
- 2.3.1 Files in a Project
- 2.3.2 Selecting a Configuration
- 2.3.3 Setting Build Options
- 2.3.3.1 Compile and Link Options for a Configuration or Certain Files
- 2.3.3.2 Saving and Using the Project Setting Environment for Different Projects
- 2.3.3.3 Source Browser Information for a Configuration
- 2.3.4 Specifying Consistent Library Types
- 2.3.5 Creating the Executable Program
- 2.4 Errors During the Build Process
- 2.5 Compiler Limits
- 2.6 Running Fortran Applications
- 2.7 Copying Projects
- 2.8 Visual Fortran Samples
- 2.8.1 Roadmap to the Visual Fortran Samples
3 Using the Compiler and Linker from the Command Line
- 3.1 The Format of the DF Command
- 3.2 Examples of the DF Command Format
- 3.3 Input and Output Files
- 3.3.1 Naming Output Files
- 3.3.2 Temporary Files
- 3.4 Environment Variables Used with the DF Command
- 3.5 Specifying Project Types with DF Command Options
- 3.6 Redirecting Command-Line Output to Files
- 3.7 Using the DF Command to Compile and Link
- 3.7.1 Compiling and Linking a Single Source File
- 3.7.2 Using the DF Environment Variable to Specify Options
- 3.7.3 Compiling, but not Linking, a Fortran Source File
- 3.7.4 Compiling and Linking Multiple Fortran Source Files
- 3.7.5 Generating a Listing File
- 3.7.6 Linking Against Additional Libraries
- 3.7.7 Linking Object Files
- 3.7.8 Compiling and Linking for Debugging
- 3.7.9 Compiling and Linking for Optimization
- 3.7.10 Compiling and Linking Mixed-Language Programs
- 3.8 DF Indirect Command File Use
- 3.9 Compiler and Linker Messages
- 3.9.1 Compiler Diagnostic Messages and Error Conditions
- 3.9.2 Linker Diagnostic Messages and Error Conditions
4 Compiler and Linker Options
- 4.1 Compiler Options
- 4.1.1 Categories of Compiler Options
- 4.1.2 /[no]alignment
- 4.1.3 /[no]altparam
- 4.1.4 /[no]annotations
- 4.1.5 /architecture
- 4.1.6 /[no]asmattributes
- 4.1.7 /[no]asmfile
- 4.1.8 /assume
- 4.1.9 /bintext
- 4.1.10 /[no]browser
- 4.1.11 /ccdefault
- 4.1.12 /[no]check
- 4.1.13 /[no]comments
- 4.1.14 /[no]compile_only
- 4.1.15 /convert
- 4.1.16 /cxml
- 4.1.17 /[no]d_lines
- 4.1.18 /[no]dbglibs
- 4.1.19 /[no]debug
- 4.1.20 /define
- 4.1.21 dll
- 4.1.22 /[no]error_limit
- 4.1.23 /[no]exe
- 4.1.24 /[no]extend_source
- 4.1.25 /extfor
- 4.1.26 /extfpp
- 4.1.27 /extlnk
- 4.1.28 /[no]f66
- 4.1.29 /[no]f77rtl
- 4.1.30 /fast
- 4.1.31 /[no]fixed
- 4.1.32 /[no]fltconsistency (ia32 only)
- 4.1.33 /[no]fpconstant
- 4.1.34 /fpe
- 4.1.35 /fpp
- 4.1.36 /[no]fpscomp
- 4.1.37 /[no]free
- 4.1.38 /help
- 4.1.39 /iface
- 4.1.40 /imsl
- 4.1.41 /[no]include
- 4.1.42 /[no]inline
- 4.1.43 /[no]intconstant
- 4.1.44 /integer_size
- 4.1.45 /[no]keep
- 4.1.46 /[no]libdir
- 4.1.47 /libs
- 4.1.48 /[no]link
- 4.1.49 /[no]list
- 4.1.50 /[no]logo
- 4.1.51 /[no]machine_code
- 4.1.52 /[no]map
- 4.1.53 /math_library
- 4.1.54 /[no]module
- 4.1.55 /names
- 4.1.56 /nodefine
- 4.1.57 /[no]object
- 4.1.58 /[no]optimize
- 4.1.59 /[no]pad_source
- 4.1.60 /[no]pdbfile
- 4.1.61 /[no]pipeline (ia64 only)
- 4.1.62 /preprocess_only
- 4.1.63 /real_size
- 4.1.64 /[no]recursive
- 4.1.65 /[no]reentrancy
- 4.1.66 /[no]show
- 4.1.67 /source
- 4.1.68 /[no]stand
- 4.1.69 /[no]static
- 4.1.70 /[no]syntax_only
- 4.1.71 /[no]threads
- 4.1.72 /[no]traceback
- 4.1.73 /[no]transform_loops
- 4.1.74 /tune
- 4.1.75 /undefine
- 4.1.76 /unroll
- 4.1.77 /[no]vms
- 4.1.78 /[no]warn
- 4.1.79 /[no]watch
- 4.1.80 /what
- 4.1.81 /winapp
- 4.2 Linker Options and Related Information
- 4.2.1 Setting LINK Options in Microsoft Visual Developer Environment
- 4.2.2 Rules for LINK Options
- 4.2.3 /ALIGN
- 4.2.4 /BASE
- 4.2.5 /COMMENT
- 4.2.6 /DEBUG
- 4.2.7 /DEBUGTYPE
- 4.2.8 /DEF
- 4.2.9 /DEFAULTLIB
- 4.2.10 /DELAY
- 4.2.11 /DELAYLOAD
- 4.2.12 /DLL
- 4.2.13 /DRIVER
- 4.2.14 /ENTRY
- 4.2.15 /EXETYPE
- 4.2.16 /FIXED
- 4.2.17 /FORCE
- 4.2.18 /HEAP
- 4.2.19 /IMPLIB
- 4.2.20 /IMPORT
- 4.2.21 /INCLUDE
- 4.2.22 /INCREMENTAL
- 4.2.23 /LARGEADDRESSAWARE
- 4.2.24 /LIBPATH
- 4.2.25 /LINK50COMPAT
- 4.2.26 /MACHINE
- 4.2.27 /MAP
- 4.2.28 /MAPINFO
- 4.2.29 /MERGE
- 4.2.30 /NODEFAULTLIB
- 4.2.31 /NOENTRY
- 4.2.32 /NOLOGO
- 4.2.33 /OPT
- 4.2.34 /ORDER
- 4.2.35 /OUT
- 4.2.36 /PDB
- 4.2.37 /PDBTYPE
- 4.2.38 /PROFILE
- 4.2.39 /RELEASE
- 4.2.40 /SECTION
- 4.2.41 /STACK
- 4.2.42 /STUB
- 4.2.43 /SUBSYSTEM
- 4.2.44 /SWAPRUN
- 4.2.45 /VERBOSE
- 4.2.46 /VERSION
- 4.2.47 /VXD
- 4.2.48 /WARN
- 4.2.49 /WS
- 4.2.50 Module-Definition Files
- 4.2.50.1 Rules for Module-Definition Statements
- 4.2.50.2 DESCRIPTION
- 4.2.50.3 EXPORTS
- 4.2.50.4 LIBRARY
- 4.2.50.5 NAME
- 4.2.50.6 STACKSIZE
- 4.2.50.7 VERSION
- 4.2.51 Linker Reserved Words
- 4.3 Microsoft Fortran PowerStation Command-Line Compatibility
- 4.3.1 Using the DF or FL32 Command Line
- 4.3.2 Equivalent Visual Fortran Compiler Options
5 Debugging Fortran Programs
- 5.1 Preparing Your Program for Debugging
- 5.2 Debugging the Squares Example Program
- 5.3 Viewing Fortran Data Types in the Debugger
- 5.4 Using the Array Viewer in the Debugger
- 5.5 Locating Run-Time Errors in the Debugger
6 Performance: Making Programs Run Faster
- 6.1 Software Environment and Efficient Compilation
- 6.1.1 Install the Latest Version of Visual Fortran and Performance Products
- 6.1.2 Compile With Appropriate Options and Multiple Source Files
- 6.2 Analyze Program Performance
- 6.2.1 Timing Your Application
- 6.2.2 Profiling and Performance Tools
- 6.3 Data Alignment Considerations
- 6.3.1 Causes of Unaligned Data and Ensuring Natural Alignment
- 6.3.2 Checking for Inefficient Unaligned Data
- 6.3.3 Ordering Data Declarations to Avoid Unaligned Data
- 6.3.3.1 Arranging Data Items in Common Blocks
- 6.3.3.2 Arranging Data Items in Derived-Type Data
- 6.3.3.3 Arranging Data Items in Digital Fortran Record Structures
- 6.3.4 Options Controlling Alignment
- 6.4 Use Arrays Efficiently
- 6.4.1 Accessing Arrays Efficiently
- 6.4.2 Passing Array Arguments Efficiently
- 6.5 Improve Overall I/O Performance
- 6.5.1 Use Unformatted Files Instead of Formatted Files
- 6.5.2 Write Whole Arrays or Strings
- 6.5.3 Write Array Data in the Natural Storage Order
- 6.5.4 Use Memory for Intermediate Results
- 6.5.5 Enable Implied-DO Loop Collapsing
- 6.5.6 Use of Variable Format Expressions
- 6.5.7 Efficient Use of Record Buffers and Disk I/O
- 6.5.8 Specify RECL
- 6.5.9 Use the Optimal Record Type
- 6.6 Additional Source Code Guidelines for Run-Time Efficiency
- 6.6.1 Avoid Small Integer and Small Logical Data Items (ia64 only)
- 6.6.2 Avoid Mixed Data Type Arithmetic Expressions
- 6.6.3 Use Efficient Data Types
- 6.6.4 Avoid Using Slow Arithmetic Operators
- 6.6.5 Avoid EQUIVALENCE Statement Use
- 6.6.6 Use Statement Functions and Internal Subprograms
- 6.6.7 Code DO Loops for Efficiency
- 6.7 Optimization Levels: the /optimize Option
- 6.7.1 Optimizations Performed at All Optimization Levels
- 6.7.2 Local (Minimal) Optimizations
- 6.7.2.1 Common Subexpression Elimination
- 6.7.2.2 Integer Multiplication and Division Expansion
- 6.7.2.3 Compile-Time Operations
- 6.7.2.4 Value Propagation
- 6.7.2.5 Dead Store Elimination
- 6.7.2.6 Register Usage
- 6.7.2.7 Mixed Real/Complex Operations
- 6.7.3 Global Optimizations
- 6.7.4 Additional Global Optimizations
- 6.7.4.1 Loop Unrolling
- 6.7.4.2 Code Replication to Eliminate Branches
- 6.7.5 Automatic Inlining
- 6.7.5.1 Interprocedure Analysis
- 6.7.5.2 Inlining Procedures
- 6.7.6 Loop Transformation and Software Pipelining
- 6.7.6.1 Loop Transformations
- 6.7.6.2 Software Pipelining (ia64 only)
- 6.8 Other Options Related to Optimization
- 6.8.1 Options Set by the /fast Option
- 6.8.2 Controlling Loop Unrolling
- 6.8.3 Controlling the Inlining of Procedures
- 6.8.4 Arithmetic Reordering Optimizations
- 6.8.5 Dummy Aliasing Assumption
- 6.8.6 Requesting Optimized Code for a Specific Processor Generation
- 6.8.7 Requesting Code Generation for a Specific Processor Generation
- 6.9 Compiler Directives Related to Performance
- 6.9.1 Using the cDEC$ OPTIONS Directive
- 6.9.2 Using the cDEC$ UNROLL Directive to Control Loop Unrolling
- 6.9.3 Using the cDEC$ IVDEP Directive to Control Certain Loop Optimizations
7 Using QuickWin
- 7.1 Capabilities of QuickWin
- 7.2 Comparing QuickWin with Windows-Based Applications
- 7.3 Using Win32 with QuickWin
- 7.4 Types of QuickWin Programs
- 7.4.1 Fortran Standard Graphics Applications
- 7.4.2 Fortran QuickWin Graphics Applications
- 7.5 The QuickWin User Interface
- 7.5.1 Default QuickWin Menus
- 7.6 USE Statement Needed for QuickWin Applications
- 7.7 Creating QuickWin Windows
- 7.7.1 Accessing Window Properties
- 7.7.2 Creating Child Windows
- 7.7.3 Giving a Window Focus and Setting the Active Window
- 7.7.4 Keeping Child Windows Open
- 7.7.5 Controlling Size and Position of Windows
- 7.8 Using Graphics and Character-Font Routines
- 7.9 Defining Graphics Characteristics
- 7.9.1 Selecting Display Options
- 7.9.2 Setting Graphics Coordinates
- 7.9.3 Using Color
- 7.9.4 Setting Figure Properties
- 7.10 Displaying Graphics Output
- 7.10.1 Drawing Graphics
- 7.10.2 Displaying Character-Based Text
- 7.10.3 Displaying Font-Based Characters
- 7.11 Working with Screen Images
- 7.11.1 Transferring Images in Memory
- 7.11.2 Loading and Saving Images to Files
- 7.11.3 Editing Text and Graphics from the QuickWin Edit Menu
- 7.12 Enhancing QuickWin Applications
- 7.13 Customizing QuickWin Applications
- 7.13.1 Program Control of Menus
- 7.13.2 Changing Status Bar and State Messages
- 7.13.3 Displaying Message Boxes
- 7.13.4 Defining an About Box
- 7.13.5 Using Custom Icons
- 7.13.6 Using a Mouse
- 7.14 QuickWin Programming Precautions
- 7.14.1 Blocking Procedures
- 7.14.2 Callback Routines
- 7.15 Simulating Nonblocking I/O
8 Creating Fortran DLLs
- 8.1 Coding Requirements for Sharing Procedures in DLLs
- 8.2 Coding Requirements for Sharing Data in DLLs
- 8.3 Building and Using Dynamic-Link Libraries
- 8.3.1 Building Dynamic-Link Libraries
- 8.3.2 The DLL Build Output
- 8.3.3 Checking the DLL Symbol Export Table
- 8.3.4 Building Executables that Use DLLs
- 8.3.5 DLL Sample Programs
9 Creating Windows Applications
- 9.1 Calling Win32 Routines
- 9.2 Coding Requirements for Fortran Windows Applications
- 9.3 Using Menus and Dialogs in SDI and MDI Fortran Windows Applications
- 9.4 Sample Fortran Windows Applications
- 9.5 Getting Help with Windows Programming
10 Portability and Design Considerations
- 10.1 Portability
- 10.1.1 Standard Fortran Language
- 10.1.1.1 Standard vs. Extensions
- 10.1.1.2 Compiler Optimizations
- 10.1.2 Operating System
- 10.1.3 Storage and Representation of Data
- 10.1.3.1 Size of Basic Types
- 10.1.3.2 Bit, Byte, and Word Characteristics
- 10.1.3.2.1 Big End or Little End Ordering
- 10.1.3.2.2 Binary Representations
- 10.1.3.2.3 Declaring Data Types
- 10.1.3.3 Transportability of Data
- 10.1.4 Storage and Representation of Data
- 10.2 Choosing Your Development Environment
- 10.3 Selecting a Program Type
- 10.4 Structuring Your Program
- 10.4.1 Creating Fortran Executables
- 10.4.2 Advantages of Modules
- 10.4.3 Advantages of Internal Procedures
- 10.4.4 Storing Object Code in Static Libraries
- 10.4.5 Storing Routines in Dynamic-Link Libraries
- 10.5 Special Design Considerations
- 10.5.1 Porting Fortran Source Code Between Systems
- 10.5.2 Mixed-Language Issues
- 10.5.3 Porting Data Between Systems
- 10.6 Using the Special Features of Microsoft Windows
- 10.6.1 Built-in Benefits of Windows
- 10.6.2 Single or Multithread Program Execution
- 10.6.3 Dialog Boxes
- 10.6.4 QuickWin and Windows Programs
11 Using Dialogs
- 11.1 Using the Resource Editor to Design a Dialog
- 11.1.1 Setting Control Properties
- 11.1.2 Including Resources Using Multiple Resource Files
- 11.1.3 The Include (.FD) File
- 11.2 Writing a Dialog Application
- 11.2.1 Initializing and Activating the Dialog Box
- 11.2.2 Dialog Callback Routines
- 11.2.3 Using a Modeless Dialog Box
- 11.2.4 Using Fortran AppWizards to Help Add Modal Dialog Box Coding
- 11.2.5 Using Fortran AppWizards to Help Add Modeless Dialog Box Coding
- 11.2.6 Using Dialog Controls in a DLL
- 11.3 Dialog Routines
- 11.4 Dialog Controls
- 11.4.1 Control Indexes
- 11.4.2 Available Indexes for Each Dialog Control
- 11.4.3 Specifying Control Indexes
- 11.5 Using Dialog Controls
- 11.5.1 Using Static Text
- 11.5.2 Using Edit Boxes
- 11.5.3 Using Group Boxes
- 11.5.4 Using Check Boxes and Radio Buttons
- 11.5.5 Using Buttons
- 11.5.6 Using List Boxes and Combo Boxes
- 11.5.7 Using Scroll Bars
- 11.5.8 Using Pictures
- 11.5.9 Using Progress Bars
- 11.5.10 Using Spin Controls
- 11.5.11 Using Sliders
- 11.5.12 Using Tab Controls
- 11.5.13 Setting Return Values and Exiting
- 11.6 Using ActiveX Controls
- 11.6.1 Using the Resource Editor to Insert an ActiveX Control
- 11.6.2 Using the Fortran Module Wizard to Generate Code
- 11.6.3 Adding Code to Your Application
- 11.6.4 Target System Requirements
12 Drawing Graphics Elements
- 12.1 Working with Graphics Modes
- 12.1.1 Checking the Current Graphics Mode
- 12.1.2 Setting the Graphics Mode
- 12.1.3 Writing a Graphics Program
- 12.1.3.1 Activating a Graphics Mode
- 12.1.3.2 Drawing Lines on the Screen
- 12.1.3.3 Drawing a Sine Curve
- 12.1.3.4 Adding Shapes
- 12.2 Adding Color
- 12.2.1 Color Mixing
- 12.2.2 VGA Color Palette
- 12.2.3 Using Text Colors
- 12.3 Understanding Coordinate Systems
- 12.3.1 Text Coordinates
- 12.3.2 Graphics Coordinates
- 12.3.3 Real Coordinates Sample Program
- 12.4 Advanced Graphics Using OpenGL
13 Using Fonts from the Graphics Library
- 13.1 Available Typefaces
- 13.2 Using Fonts
- 13.2.1 Initializing Fonts
- 13.2.2 Setting the Font and Displaying Text
- 13.3 SHOWFONT.F90 Example
14 Using National Language Support Routines
- 14.1 Single and Multibyte Character Sets
- 14.2 National Language Support Library Routines
- 14.2.1 Locale Setting and Inquiry Routines
- 14.2.2 NLS Formatting Routines
- 14.2.3 Multibyte Character Routines
- 14.2.3.1 MBCS Inquiry Routines
- 14.2.3.2 MBCS Conversion Routines
- 14.2.3.3 MBCS Fortran Equivalent Routines
- 14.2.3.4 Standard Fortran Routines that Handle MBCS Characters
15 Portability Library
- 15.1 Using the Portability Library
- 15.2 Routines for Information Retrieval
- 15.2.1 Device and Directory Information Routines
- 15.3 Process Control Routines
- 15.4 Numeric Routines
- 15.5 Input and Output with Portability Routines
- 15.6 Date and Time Routines
- 15.7 Error Handling Routines
- 15.8 Miscellaneous String and Sorting Routines
- 15.9 Other Compatibility Routines
16 Files, Devices, and I/O Hardware
- 16.1 Devices and Files
- 16.1.1 Logical Devices
- 16.1.2 Files
- 16.1.2.1 Record Types
- 16.1.1.2 Microsoft Fortran PowerStation Compatible Files
- 16.2 I/O Hardware
- 16.2.1 Printing
- 16.2.2 Physical Devices
- 16.3 Using the Console
- 16.4 Using the Serial I/O Port Routines
17 Using COM and Automation Objects
- 17.1 Overview of COM and Automation Objects
- 17.2 The Role of the Module Wizard
- 17.3 Using the Module Wizard to Generate Code
- 17.4 Calling Routines Generated by the Module Wizard
- 17.5 Getting a Pointer to an Object's Interface
- 17.6 Additional Resources about COM and Automation
18 Creating a COM Server
- 18.1 Advantages of a COM Server
- 18.2 What You Need to Provide and What the Fortran COM Server Wizard Will Do
- 18.3 Using the Fortran COM Server Wizard
- 18.4 Interface Design Considerations
- 18.5 Advanced COM Server Topics
- 18.6 Deploying the Server on Another System
19 Programming with Mixed Languages
- 19.1 Overview of Mixed-Language Issues
- 19.1.1 Adjusting Calling Conventions in Mixed-Language Programming
- 19.1.1.1 ATTRIBUTES Properties and Calling Conventions
- 19.1.1.2 Stack Considerations in Calling Conventions
- 19.1.1.3 Fortran/C Calling Conventions
- 19.1.1.4 Fortran/Visual Basic Calling Conventions
- 19.1.1.5 Fortran/MASM Calling Conventions
- 19.1.2 Adjusting Naming Conventions in Mixed-Language Programming
- 19.1.2.1 Visual C/C++ and Visual Basic Naming Conventions
- 19.1.2.2 MASM Naming Conventions
- 19.1.2.3 Naming Conventions for Fortran, C/C++, Visual Basic, MASM
- 19.1.2.4 Reconciling the Case of Names
- 19.1.2.5 Fortran Modules Names and ATTRIBUTES
- 19.1.3 Prototyping a Procedure in Fortran
- 19.2 Exchanging and Accessing Data in Mixed-Language Programming
- 19.2.1 Passing Arguments in Mixed-Language Programming
- 19.2.2 Using Modules in Mixed-Language Programming
- 19.2.3 Using Common External Data in Mixed-Language Programming
- 19.3 Handling Data Types in Mixed-Language Programming
- 19.3.1 Handling Numeric, Complex, and Logical Data Types
- 19.3.2 Handling Fortran 95/90 Array Pointers and Allocatable Arrays
- 19.3.3 Handling Digital Fortran Pointers
- 19.3.4 Handling Arrays and Visual Fortran Array Descriptors
- 19.3.5 Handling Character Strings
- 19.3.6 Handling User-Defined Types
- 19.4 Visual Fortran/Visual C++ Mixed-Language Programs
- 19.5 Fortran/Visual Basic Mixed-Language Programs
- 19.5.1 Calling Visual Fortran from Visual Basic
- 19.5.2 Visual Basic Debugging Considerations
- 19.5.3 Examples of Fortran/Visual Basic Programs
- 19.6 Fortran/MASM Mixed-Language Programs
- 19.6.1 Creating a MASM Procedure
- 19.6.2 Fortran/MASM Alignment and Return Value Considerations
- 19.6.3 Examples of Fortran/MASM Programming
20 Creating Multithread Applications
- 20.1 Basic Concepts of Multithreading
- 20.2 Writing a Multithread Program
- 20.2.1 Modules for Multithread Programs
- 20.2.2 Starting and Stopping Threads
- 20.2.3 Thread Routine Format
- 20.2.4 Sharing Resources
- 20.2.5 Thread Local Storage
- 20.2.6 Synchronizing Threads
- 20.2.7 Handling Errors in Multithread Programs
- 20.2.8 Working with Multiple Processes
- 20.2.9 Table of Multithread Routines
- 20.3 Compiling and Linking Multithread Programs
- 20.4 Other Sources of Information
21 Data Representation
- 21.1 Integer Data Representations
- 21.1.1 INTEGER(KIND=1) Representation
- 21.1.2 INTEGER(KIND=2) Representation
- 21.1.3 INTEGER(KIND=4) Representation
- 21.1.4 INTEGER(KIND=8) Representation
- 21.2 Logical Data Representations
- 21.3 Native IEEE Floating-Point Representations
- 21.3.1 REAL(KIND=4) (REAL) Representation
- 21.3.2 REAL(KIND=8) (DOUBLE PRECISION) Representation
- 21.3.3 COMPLEX(KIND=4) (COMPLEX) Representation
- 21.3.4 COMPLEX(KIND=8) (DOUBLE COMPLEX) Representation
- 21.4 Character Representation
- 21.5 Hollerith Representation
22 Handling Run-Time Errors
- 22.1 Default Run-Time Error Processing
- 22.1.1 Run-Time Message Display and Format
- 22.1.2 Values Returned at Program Termination
- 22.2 Methods of Handling Errors
- 22.2.1 Using the END, EOR, and ERR Branch Specifiers
- 22.2.2 Using the IOSTAT Specifier and Fortran Exit Codes
- 22.3 Locating Run-Time Errors
- 22.4 Using Traceback Information
- 22.4.1 Tools to Help You Understand Traceback Output
- 22.4.2 Relevant Fortran Run-Time Environment Variables
- 22.4.3 Tradeoffs and Restrictions
- 22.4.4 Example Programs and Traceback Information
- 22.5 Obtaining Traceback Information with TRACEBACKQQ
- 22.6 Run-Time Environment Variables
23 The Floating-Point Environment
- 23.1 Representing Numbers
- 23.1.1 Floating-Point Numbers
- 23.1.1.1 Floating-Point Formats
- 23.1.1.2 Floating-Point Representation
- 23.1.1.3 Viewing Floating-Point Representations with BitViewer
- 23.1.1.4 Special Values
- 23.1.2 Retrieving Parameters of Numeric Representations
- 23.2 Loss of Precision Errors: Rounding, Special Values, Underflow, and Overflow
- 23.2.1 Rounding Errors
- 23.2.1.1 ULPs, Relative Error, and Machine Epsilon
- 23.3 Setting and Retrieving Floating-Point Status and Control Words (x86 only)
- 23.3.1 Floating-Point Status Word (x86 only)
- 23.3.2 Floating-Point Control Word (x86 only)
- 23.3.2.1 Exception Parameters
- 23.3.2.2 Precision Parameters
- 23.3.2.3 Rounding Parameters
- 23.4 Handling Arithmetic Exceptions
- 23.4.1 Handling Floating-Point Exceptions
- 23.4.2 Handling Run-Time Math Exceptions (x86 only)
- 23.5 Intel Pentium Floating-Point Flaw (x86 only)
24 Advanced Exception and Termination Handling Considerations
- 24.1 Default Exception Handling, Console Event Handling, and Termination Handling
- 24.1.1 General Default Exception Handling
- 24.1.2 How the Floating-Point Exception Handling (/fpe) Compiler Option Works
- 24.1.3 Default Console Event Handling
- 24.1.4 General Default Termination Handling Provided
- 24.2 Structure of a Visual Fortran Application
- 24.3 When to Provide Your Own Exception/Termination Handler
- 24.4 How to Provide Your Own Exception/Termination Handler
- 24.4.1 Using Windows Structured Exception Handling (SEH)
- 24.4.2 Using SIGNALQQ and How SIGNALQQ Works
- 24.4.3 Suggestions for Console Event Handlers
25 Converting Unformatted Numeric Data
- 25.1 Supported Native and Nonnative Numeric Formats
- 25.2 Limitations of Numeric Conversion
- 25.3 Methods of Specifying the Data Format
- 25.3.1 Environment Variable FORT_CONVERTn Method
- 25.3.2 Environment Variable FORT_CONVERT.ext or FORT_CONVERT_ext Method
- 25.3.3 OPEN Statement CONVERT= Method
- 25.3.3 OPTIONS Statement Method
- 25.3.3 Compiler Option /convert Method
- 25.4 Additional Notes on Nonnative Data
26 Hexadecimal-Binary-Octal-Decimal Conversion
27 Using the IMSL Mathematical and Statistical Libraries
- 27.1 Using the IMSL Libraries from Visual Fortran
- 27.2 Library Naming Conventions
- 27.3 Using IMSL Libraries in a Mixed-Language Environment
28 Using the Compaq Extended Math Library (CXML)
- 28.1 CXML Routine Groups
- 28.2 Using CXML from Visual Fortran
29 Compatibility Information
- 29.1 Compatibility with Compaq Fortran on Other Platforms
- 29.2 Compatibility with Microsoft Fortran Powerstation
30 Using Visual Fortran Tools
- 30.1 Overview of Visual Fortran Tools
- 30.2 Using Tools from the Command Line
- 30.3 Setting Up the Command Console
- 30.3.1 Configuring the Command Console Window
- 30.3.2 Setting Search Paths in the Console
- 30.4 Fortran Compiler and Linker
- 30.5 MS-DOS Editor
- 30.6 Building Projects with NMAKE
- 30.6.1 Running NMAKE
- 30.6.1.1 NMAKE Options
- 30.6.1.2 NMAKE Option Descriptions
- 30.6.1.3 TOOLS.INI and NMAKE
- 30.6.1.4 Exit Codes from NMAKE
- 30.6.2 Contents of a Makefile
- 30.6.2.1 Wildcards and NMAKE
- 30.6.2.2 Long Filenames in a Makefile
- 30.6.2.3 Comments in a Makefile
- 30.6.2.4 Special Characters in a Makefile
- 30.6.3 Description Blocks
- 30.6.3.1 Targets
- 30.6.3.2 Pseudotargets
- 30.6.3.3 Multiple Targets
- 30.6.3.4 Cumulative Dependencies
- 30.6.3.5 Targets in Multiple Description Blocks
- 30.6.3.6 Dependents
- 30.6.4 Commands in a Makefile
- 30.6.4.1 Command Modifiers in NMAKE
- 30.6.4.2 Filename-Parts Syntax in NMAKE
- 30.6.5 Inline Files in a Makefile
- 30.6.5.1 Specifying an Inline File in Makefiles
- 30.6.5.2 Creating Inline File Text in Makefiles
- 30.6.5.3 Reusing Inline Files in Makefiles
- 30.6.5.4 Multiple Inline Files
- 30.6.6 Macros and NMAKE
- 30.6.6.1 Defining an NMAKE Macro
- 30.6.6.2 Special Characters in NMAKE Macros
- 30.6.6.3 Null and Undefined NMAKE Macro
- 30.6.6.4 Where to Define Macros
- 30.6.6.5 Precedence in Macro Definitions
- 30.6.6.6 Using an NMAKE Macro
- 30.6.6.7 Macro Substitution
- 30.6.6.8 Special NMAKE Macros
- 30.6.7 NMAKE Inference Rules
- 30.6.7.1 Defining an Inference Rule in NMAKE
- 30.6.7.2 Search Paths in Inference Rules
- 30.6.7.3 Batch-Mode Rules
- 30.6.7.4 Predefined Inference Rules
- 30.6.7.5 Inferred Dependents and Rules
- 30.6.7.6 Precedence in NMAKE Inference Rules
- 30.6.8 Dot Directives in Makefiles
- 30.6.9 Makefile Preprocessing
- 30.6.9.1 Makefile Preprocessing Directives
- 30.6.9.2 Expressions in Makefile Preprocessing
- 30.6.9.3 Makefile Preprocessing Operators
- 30.6.9.4 Executing a Program in Preprocessing
- 30.7 Resource Compiler Options
- 30.7.1 Including Resources in an Application
- 30.7.2 Creating a Resource-Definition File
- 30.7.3 Resource Compiler Command Line
- 30.8 Managing Libraries with LIB
- 30.8.1 LIB Input/Output
- 30.8.1.1 LIB Input Files
- 30.8.1.2 LIB Output Files
- 30.8.1.3 Other LIB Output
- 30.8.1.4 Viewing Contents of a Library
- 30.8.2 Running LIB
- 30.8.2.1 LIB Command Line
- 30.8.2.2 LIB Command Files
- 30.8.2.3 Using LIB Options
- 30.8.3 LIB Options
- 30.8.4 Extracting a Library Member
- 30.8.5 Import Libraries and Export Files
- 30.8.5.1 Building an Import Library and Export File
- 30.8.5.2 Using an Import Library and Export File
- 30.9 Editing Files with EDITBIN
- 30.9.1 EDITBIN Command Line
- 30.9.2 EDITBIN Options
- 30.9.2.1 EDITBIN Option /BIND
- 30.9.2.2 EDITBIN Option /HEAP
- 30.9.2.3 EDITBIN Option /LARGEADDRESSAWARE
- 30.9.2.4 EDITBIN Option /NOLOGO
- 30.9.2.5 EDITBIN Option /REBASE
- 30.9.2.6 EDITBIN Option /RELEASE
- 30.9.2.7 EDITBIN Option /SECTION
- 30.9.2.8 EDITBIN Option /STACK
- 30.9.2.9 EDITBIN Option /SUBSYSTEM
- 30.9.2.10 EDITBIN Option /SWAPRUN
- 30.9.2.11 EDITBIN Option /VERSION
- 30.9.2.12 EDITBIN Option /WS
- 30.10 Examining Files with DUMPBIN
- 30.10.1 DUMPBIN Command Line
- 30.10.2 DUMPBIN Options
- 30.11 Editing Format Descriptors with the Format Editor
- 30.11.1 Starting the Format Editor from Microsoft Developer Studio
- 30.12 Profiling Code from the Command Line
- 30.12.1 Profiler Batch Processing
- 30.12.2 Profiler Batch Files
- 30.12.3 Profiler Command-Line Options
- 30.12.3.1 PREP
- 30.12.3.2 PROFILE
- 30.12.3.3 PLIST
- 30.12.4 Exporting Data from the Profiler
- 30.12.4.1 Tab-Delimited Record Format
- 30.12.4.2 Global Information Records
- 30.12.4.3 Local Information Records
- 30.12.4.4 Steps to Analyze Profiler Statistics
- 30.12.4.5 Processing Profiler Output with Microsoft Excel
- 30.12.4.6 Generating the Tab-Delimited Report
- 30.12.4.7 Using the PROFILER.XLM Macro
- 30.12.4.8 Changing the PROFILER.XLM Selection Criteria
- 30.13 Fortran Tools: FSPLIT and FPR