Compaq Visual Fortran Version 6.6

Home Page

Copyright Page

New Features for Compaq Visual Fortran Version 6.6

Using the Compaq Visual Fortran Web Pages

Programmer's Guide

Language Reference

Error Messages

Visual Fortran: Programmer's Guide

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

Visual Fortran: Language Reference

1 Introduction to the Language Reference

1.1 Language Reference Conventions

2 Overview

2.1 Language Standards Conformance

2.2 Language Compatibility

2.3 Fortran 95 Features

2.3.1 New Features

2.3.2 Improved Features

2.4 Fortran 90 Features

2.4.1 New Features

2.4.2 Improved Features

3 Program Structure, Characters, and Source Forms

3.1 Program Structure

3.1.1 Statements

3.1.2 Names

3.1.3 Keywords

3.2 Character Sets

3.3 Source Forms

3.3.1 Free Source Form

3.3.2 Fixed and Tab Source Forms

3.3.2.1 Fixed-Format Lines

3.3.2.2 Tab-Format Lines

3.3.3 Source Code Useable for All Source Forms

4 Data Types, Constants, and Variables

4.1 Intrinsic Data Types

4.1.1 Integer Data Types

4.1.1.1 Integer Constants

4.1.2 Real Data Types

4.1.2.1 General Rules for Real Constants

4.1.2.2 REAL(4) Constants

4.1.2.3 REAL(8) or DOUBLE PRECISION Constants

4.1.2.4 REAL(16) Constants (VMS, U*X)

4.1.3 Complex Data Types

4.1.3.1 General Rules for Complex Constants

4.1.3.2 COMPLEX(4) Constants

4.1.3.3 COMPLEX(8) or DOUBLE COMPLEX Constants

4.1.3.4 COMPLEX(16) Constants (VMS, U*X)

4.1.4 Logical Data Types

4.1.4.1 Logical Constants

4.1.5 Character Data Type

4.1.5.1 Character Constants

4.1.5.2 C Strings in Character Constants

4.1.5.3 Character Substrings

4.2 Derived Data Types

4.2.1 Derived-Type Definition

4.2.2 Default Initialization

4.2.3 Structure Components

4.2.4 Structure Constructors

4.3 Binary, Octal, Hexadecimal, and Hollerith Constants

4.3.1 Binary Constants

4.3.2 Octal Constants

4.3.3 Hexadecimal Constants

4.3.4 Hollerith Constants

4.3.5 Determining the Data Type of Nondecimal Constants

4.4 Variables

4.4.1 Data Types of Scalar Variables

4.4.1.1 Specification of Data Type

4.4.1.2 Implicit Typing Rules

4.4.2 Arrays

4.4.2.1 5 Whole Arrays

4.4.2.2 Array Elements

4.4.2.3 Array Sections

4.4.2.3.1 Subscript Triplets

4.4.2.3.2 Vector Subscripts

4.4.2.4 Array Constructors

5 Expressions and Assignment Statements

5.1 Expressions

5.1.1 Numeric Expressions

5.1.1.1 Using Parentheses in Numeric Expressions

5.1.1.2 Data Type of Numeric Expressions

5.1.2 Character Expressions

5.1.3 Relational Expressions

5.1.4 Logical Expressions

5.1.5 Defined Operations

5.1.6 Summary of Operator Precedence

5.1.7 Initialization and Specification Expressions

5.1.7.1 Initialization Expressions

5.1.7.2 Specification Expressions

5.2 Assignment Statements

5.2.1 Intrinsic Assignments

5.2.1.1 Numeric Assignment Statements

5.2.1.2 Logical Assignment Statements

5.2.1.3 Character Assignment Statements

5.2.1.4 Derived-Type Assignment Statements

5.2.1.5 Array Assignment Statements

5.2.2 Defined Assignments

5.2.3 Pointer Assignments

5.2.4 WHERE Statement and Construct

5.2.5 FORALL Statement and Construct

6 Specification Statements

6.1 Type Declaration Statements

6.1.1 Declaration Statements for Noncharacter Types

6.1.2 Declaration Statements for Character Types

6.1.3 Declaration Statements for Derived Types

6.1.4 Declaration Statements for Arrays

6.1.4.1 Explicit-Shape Specifications

6.1.4.2 Assumed-Shape Specifications

6.1.4.3 Assumed-Size Specifications

6.1.4.4 Deferred-Shape Specifications

6.2 ALLOCATABLE Attribute and Statement

6.3 AUTOMATIC and STATIC Attributes and Statements

6.4 COMMON Statement

6.5 DATA Statement

6.6 DIMENSION Attribute and Statement

6.7 EQUIVALENCE Statement

6.7.1 Making Arrays Equivalent

6.7.2 Making Substrings Equivalent

6.7.3 EQUIVALENCE and COMMON Interaction

6.8 EXTERNAL Attribute and Statement

6.9 IMPLICIT Statement

6.10 INTENT Attribute and Statement

6.11 INTRINSIC Attribute and Statement

6.12 NAMELIST Statement

6.13 OPTIONAL Attribute and Statement

6.14 PARAMETER Attribute and Statement

6.15 POINTER Attribute and Statement

6.16 PRIVATE and PUBLIC Attributes and Statements

6.17 SAVE Attribute and Statement

6.18 TARGET Attribute and Statement

6.19 VOLATILE Attribute and Statement

7 Dynamic Allocation

7.1 ALLOCATE Statement

7.1.1 Allocation of Allocatable Arrays

7.1.2 Allocation of Pointer Targets

7.2 DEALLOCATE Statement

7.2.1 Deallocation of Allocatable Arrays

7.2.2 Deallocation of Pointer Targets

7.3 NULLIFY Statement

8 Execution Control

8.1 Branch Statements

8.1.1 Unconditional GO TO Statement

8.1.2 Computed GO TO Statement

8.1.3 The ASSIGN and Assigned GO TO Statements

8.1.4 Arithmetic IF Statement

8.2 CALL Statement

8.3 CASE Construct

8.4 CONTINUE Statement

8.5 DO Constructs

8.5.1 Forms for DO Constructs

8.5.2 Execution of DO Constructs

8.5.2.1 Iteration Loop Control

8.5.2.2 Nested DO Constructs

8.5.2.3 Extended Range

8.5.3 DO WHILE Statement

8.5.4 CYCLE Statement

8.5.5 EXIT Statement

8.6 END Statement

8.7 IF Construct and Statement

8.7.1 IF Construct

8.7.2 IF Statement

8.8 PAUSE Statement

8.9 RETURN Statement

8.10 STOP Statement

9 Program Units and Procedures

9.1 Main Program

9.2 Modules and Module Procedures

9.2.1 Module References

9.2.2 USE Statement

9.3 Block Data Program Units

9.4 Functions, Subroutines, and Statement Functions

9.4.1 General Rules for Function and Subroutine Subprograms

9.4.1.1 Recursive Procedures

9.4.1.2 Pure Procedures

9.4.1.3 Elemental Procedures

9.4.2 Functions

9.4.2.1 RESULT Keyword

9.4.2.2 Function References

9.4.2 Subroutines

9.4.3 Statement Functions

9.5 External Procedures

9.6 Internal Procedures

9.7 Argument Association

9.7.1 Optional Arguments

9.7.2 Array Arguments

9.7.3 Pointer Arguments

9.7.4 Assumed-Length Character Arguments

9.7.5 Character Constant and Hollerith Arguments

9.7.6 Alternate Return Arguments

9.7.7 Dummy Procedure Arguments

9.7.8 References to Generic Procedures

9.7.8.1 References to Generic Intrinsic Functions

9.7.8.2 References to Elemental Intrinsic Procedures

9.7.9 References to Non-Fortran Procedures

9.8 Procedure Interfaces

9.8.1 Determining When Procedures Require Explicit Interfaces

9.8.2 Defining Explicit Interfaces

9.8.3 Defining Generic Names for Procedures

9.8.4 Defining Generic Operators

9.8.5 Defining Generic Assignment

9.9 CONTAINS Statement

9.10 ENTRY Statement

9.10.1 ENTRY Statements in Function Subprograms

9.10.2 ENTRY Statements in Subroutine Subprograms

10 Intrinsic Procedures

10.1 Argument Keywords in Intrinsic Procedures

10.2 Overview of Intrinsic Procedures

10.2.1 Categories of Intrinsic Functions

10.2.2 Intrinsic Subroutines

10.2.3 Bit Functions

11 Data Transfer I/O Statements

11.1 Records and Files

11.2 Components of Data Transfer Statements

11.2.1 I/O Control List

11.2.1.1 Unit Specifier

11.2.1.2 Format Specifier

11.2.1.3 Namelist Specifier

11.2.1.4 Record Specifier

11.2.1.5 Key-Field-Value Specifier (VMS only)

11.2.1.6 Key-of-Reference Specifier (VMS only)

11.2.1.7 I/O Status Specifier

11.2.1.8 Branch Specifiers

11.2.1.9 Advance Specifier

11.2.1.10 Character Count Specifier

11.2.2 I/O Lists

11.2.2.1 Simple List Items in I/O Lists

11.2.2.2 Implied-Do Lists in I/O Lists

11.3 READ Statements

11.3.1 Forms for Sequential READ Statements

11.3.1.1 Rules for Formatted Sequential READ Statements

11.3.1.2 Rules for List-Directed Sequential READ Statements

11.3.1.3 Rules for Namelist Sequential READ Statements

11.3.1.4 Rules for Unformatted Sequential READ Statements

11.3.2 Forms for Direct-Access READ Statements

11.3.2.1 Rules for Formatted Direct-Access READ Statements

11.3.2.2 Rules for Unformatted Direct-Access READ Statements

11.3.3 Forms for Indexed READ Statements (VMS only)

11.3.3.1 Rules for Formatted Indexed READ Statements (VMS only)

11.3.3.2 Rules for Unformatted Indexed READ Statements (VMS only)

11.3.4 Forms and Rules for Internal READ Statements

11.4 ACCEPT Statement

11.5 WRITE Statements

11.5.1 Forms for Sequential WRITE Statements

11.5.1.1 Rules for Formatted Sequential WRITE Statements

11.5.1.2 Rules for List-Directed Sequential WRITE Statements

11.5.1.3 Rules for Namelist Sequential WRITE Statements

11.5.1.4 Rules for Unformatted Sequential WRITE Statements

11.5.2 Forms for Direct-Access WRITE Statements

11.5.2.1 Rules for Formatted Direct-Access WRITE Statements

11.5.2.2 Rules for Unformatted Direct-Access WRITE Statements

11.5.3 Forms for Indexed WRITE Statements (VMS only)

11.5.3.1 Rules for Formatted Indexed WRITE Statements (VMS only)

11.5.3.2 Rules for Unformatted Indexed WRITE Statements (VMS only)

11.5.4 Forms and Rules for Internal WRITE Statements

11.6 PRINT and TYPE Statements

11.7 REWRITE Statement

12 I/O Formatting

12.1 Format Specifications

12.2 Data Edit Descriptors

12.2.1 Forms for Data Edit Descriptors

12.2.2 General Rules for Numeric Editing

12.2.3 Integer Editing

12.2.3.1 I Editing

12.2.3.2 B Editing

12.2.3.3 O Editing

12.2.3.4 Z Editing

12.2.4 Real and Complex Editing

12.2.4.1 F Editing

12.2.4.2 E and D Editing

12.2.4.3 EN Editing

12.2.4.4 ES Editing

12.2.4.5 G Editing

12.2.4.6 Complex Editing

12.2.5 Logical Editing (L)

12.2.6 Character Editing (A)

12.2.7 Default Widths for Data Edit Descriptors

12.2.8 Terminating Short Fields of Input Data

12.3 Control Edit Descriptors

12.3.1 Forms for Control Edit Descriptors

12.3.2 Positional Editing

12.3.2.1 T Editing

12.3.2.2 TL Editing

12.3.2.3 TR Editing

12.3.2.4 X Editing

12.3.3 Sign Editing

12.3.3.1 SP Editing

12.3.3.2 SS Editing

12.3.3.3 S Editing

12.3.4 Blank Editing

12.3.4.1 BN Editing

12.3.4.2 BZ Editing

12.3.5 Scale Factor Editing (P)

12.3.6 Slash Editing (/)

12.3.7 Colon Editing (:)

12.3.8 Dollar Sign ($) and Backslash (\) Editing

12.3.9 Character Count Editing (Q)

12.4 Character String Edit Descriptors

12.4.1 Character Constant Editing

12.4.2 H Editing

12.5 Nested and Group Repeat Specifications

12.6 Variable Format Expressions

12.7 Printing of Formatted Records

12.8 Interaction Between Format Specifications and I/O Lists

13 File Operation I/O Statements (WNT, W95, U*X)

13.1 BACKSPACE Statement

13.2 CLOSE Statement

13.3 DELETE Statement

13.4 ENDFILE Statement

13.5 INQUIRE Statement

13.5.1 ACCESS Specifier

13.5.2 ACTION Specifier

13.5.3 BINARY Specifier (WNT, W95)

13.5.4 BLANK Specifier

13.5.5 BLOCKSIZE Specifier

13.5.6 BUFFERED Specifier

13.5.7 CARRIAGECONTROL Specifier

13.5.8 CONVERT Specifier

13.5.9 DELIM Specifier

13.5.10 DIRECT Specifier

13.5.11 EXIST Specifier

13.5.12 FORM Specifier

13.5.13 FORMATTED Specifier

13.5.14 IOFOCUS Specifier (WNT, W95)

13.5.15 MODE Specifier (WNT, W95)

13.5.16 NAME Specifier

13.5.17 NAMED Specifier

13.5.18 NEXTREC Specifier

13.5.19 NUMBER Specifier

13.5.20 OPENED Specifier

13.5.21 ORGANIZATION Specifier

13.5.22 PAD Specifier

13.5.23 POSITION Specifier

13.5.24 READ Specifier

13.5.25 READWRITE Specifier

13.5.26 RECL Specifier

13.5.27 RECORDTYPE Specifier

13.5.28 SEQUENTIAL Specifier

13.5.29 SHARE Specifier (WNT, W95)

13.5.30 UNFORMATTED Specifier

13.5.31 WRITE Specifier

13.6 OPEN Statement

13.6.1 ACCESS Specifier

13.6.2 ACTION Specifier

13.6.3 ASSOCIATEVARIABLE Specifier

13.6.4 BLANK Specifier

13.6.5 BLOCKSIZE Specifier

13.6.6 BUFFERCOUNT Specifier

13.6.7 BUFFERED Specifier

13.6.8 CARRIAGECONTROL Specifier

13.6.9 CONVERT Specifier

13.6.10 DEFAULTFILE Specifier

13.6.11 DELIM Specifier

13.6.12 DISPOSE Specifier

13.6.13 FILE Specifier

13.6.14 FORM Specifier

13.6.15 IOFOCUS Specifier (WNT, W95)

13.6.16 MAXREC Specifier

13.6.17 MODE Specifier (WNT, W95)

13.6.18 NAME Specifier

13.6.19 ORGANIZATION Specifier

13.6.20 PAD Specifier

13.6.21 POSITION Specifier

13.6.22 READONLY Specifier

13.6.23 RECL Specifier

13.6.24 RECORDSIZE Specifier

13.6.25 RECORDTYPE Specifier

13.6.26 SHARE Specifier (WNT, W95)

13.6.27 SHARED Specifier

13.6.28 STATUS Specifier

13.6.29 TITLE Specifier (WNT, W95)

13.6.30 TYPE Specifier

13.6.31 USEROPEN Specifier

13.7 REWIND Statement

13.8 UNLOCK Statement

14 Compilation Control Statements

15 Compiler Directives

15.1 General Compiler Directives

15.1.1 Syntax Rules for General Directives

15.2 Parallel Directives for Tru64 UNIX Systems

15.2.1 Syntax Rules for Parallel Directives (TU*X)

15.2.2 Data Scope Attribute Clauses (TU*X)

15.2.3 OpenMP Fortran API Compiler Directives (TU*X)

15.2.3.1 Conditional Compilation Rules (TU*X)

15.2.3.2 Nesting and Binding Rules (TU*X)

15.2.4 Compaq Fortran Parallel Compiler Directives (TU*X)

15.3 Equivalent Compiler Options

16 Scope and Association

16.1 Scope

16.2 Unambiguous Generic Procedure References

16.3 Resolving Procedure References

16.3.1 References to Generic Names

16.3.2 References to Specific Names

16.3.3 References to Nonestablished Names

16.4 Association

16.4.1 Name Association

16.4.1.1 Argument Association

16.4.1.2 Use and Host Association

16.4.2 Pointer Association

16.4.3 Storage Association

16.4.3.1 Storage Units and Storage Sequence

16.4.3.2 Array Association

17 Obsolescent and Deleted Language Features

17.1 Deleted Language Features in Fortran 95

17.2 Obsolescent Language Features in Fortran 95

17.3 Obsolescent Language Features in Fortran 90

18 Additional Language Features

18.1 FORTRAN-66 Interpretation of the External Statement

18.2 Alternative Syntax for the PARAMETER Statement

18.3 Alternative Syntax for Octal and Hexadecimal Constants

18.4 Alternative Syntax for a Record Specifier

18.5 Alternative Syntax for the DELETE Statement

18.6 Alternative Form for Namelist External Records

18.7 Record Structures

18.7.1 Structure Declarations

18.7.1.1 Type Declarations

18.7.1.2 Substructure Declarations

18.7.2 References to Record Fields

18.7.3 Aggregate Assignment

19 Character and Key Code Charts

19.1 ASCII Character Codes

19.1.1 ASCII Character Codes Chart 1

19.1.2 ASCII Character Codes Chart 2 (IBM Character Set)

19.2 ANSI Character Codes

19.2.1 ANSI Character Codes Chart

19.3 Key Codes

19.3.1 Key Codes Chart 1

19.3.2 Key Codes Chart 2

20 Data Representation Models

20.1 Model for Integer Data

20.2 Model for Real Data

20.3 Model for Bit Data

21 Run-Time Library Routines on Tru64 UNIX and Linux Systems

21.1 General Library Routines (U*X)

21.2 Parallel Library Routines (TU*X)

20.2.1 OpenMP Fortran API Run-Time Library Routines (TU*X)

20.2.2 Parallel Threads Routines for Compatibility (TU*X)

22 FORTRAN 77 Syntax

22.1 FORTRAN 77 Data Types

22.2 FORTRAN 77 Intrinsic Functions

22.3 FORTRAN 77 Statements

23 Summary of Language Extensions

23.1 Compaq Fortran Language Extensions

23.1.1 Source Forms

23.1.2 Names

23.1.3 Character Sets

23.1.4 Intrinsic Data Types

23.1.5 Constants

23.1.6 Expressions and Assignment

23.1.7 Specification Statements

23.1.8 Execution Control

23.1.9 Compilation Control Statements

23.1.10 Built-In Functions

23.1.11 I/O Statements

23.1.12 I/O Formatting

23.1.13 File Operation Statements

23.1.14 Compiler Directives

23.1.15 Intrinsic Procedures

23.1.16 Additional Language Features

23.2 High Performance Fortran Language Extensions

23.2.1 Data Parallel Statements

23.2.2 Procedure Prefixes

23.2.3 Intrinsic Procedures

24 A to Z Reference

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Z 

24.1 Language Summary Tables

24.1.1 Program Unit Calls and Definitions: table

24.1.2 Program Control Statements and Procedures: table

24.1.3 Specifying Variables: table

24.1.4 System, Drive, and Directory Procedures: table

24.1.5 File Management: table

24.1.6 Input/Output Procedures: table

24.1.7 Random Number Procedures: table

24.1.8 Date and Time Procedures: table

24.1.9 Keyboard and Speaker Procedures: table

24.1.10 Error Handling: table

24.1.11 Argument Inquiry: table

24.1.12 Memory Allocation and Deallocation Procedures: table

24.1.13 Array Procedures: table

24.1.14 Numeric and Type Conversion Procedures: table

24.1.15 Trigonometric, Exponential, Root, and Logarithmic Procedures: table

24.1.16 Floating-Point Inquiry and Control Procedures: table

24.1.17 Character Procedures: table

24.1.18 Bit Operation and Representation Procedures: table

24.1.19 QuickWin Procedures: table

24.1.20 Graphics Procedures: table

24.1.21 Dialog Procedures: table

24.1.22 General Compiler Directives: table

24.1.23 National Language Standard Procedures: table

24.1.24 Portability Procedures: table

24.1.25 COM and Automation Procedures: table

24.1.26 Serial Port Procedures: table

24.1.27 Miscellaneous Run-Time Procedures: table

24.1.28 Functions Not Allowed as Actual Arguments: table

24.2 A to B

ABORT

ABOUTBOXQQ

ABS

ACCEPT

ACCESS

ACHAR

ACOS

ACOSD

ADJUSTL

ADJUSTR

AIMAG

AINT

ALARM

ALIAS

ALL

ALLOCATABLE

ALLOCATE

ALLOCATED

AND

ANINT

ANY

APPENDMENUQQ

ARC, ARC_W

ASIN

ASIND

ASM (Alpha only)

ASSIGN - Label Assignment

Assignment(=) - Defined Assignment

Assignment - Intrinsic

ASSOCIATED

ATAN

ATAND

ATAN2

ATAN2D

ATOMIC (TU*X only)

ATTRIBUTES

AUTOAddArg

AUTOAllocateInvokeArgs

AUTODeallocateInvokeArgs

AUTOGetExceptInfo

AUTOGetProperty

AUTOGetPropertyByID

AUTODeallocateInvokeArgs

AUTOGetExceptInfo

AUTOGetProperty

AUTOGetPropertyByID

AUTOGetPropertyInvokeArgs

AUTOInvoke

AUTOMATIC

AUTOSetProperty

AUTOSetPropertyByID

AUTOSetPropertyInvokeArgs

BACKSPACE

BARRIER (TU*X only)

BEEPQQ

BESJ0, BESJ1, BESJN, BESY0, BESY1, BESYN

BIC, BIS

BIT

BIT_SIZE

BLOCK DATA

BSEARCHQQ

BTEST

BYTE

24.3 C to D

CALL

CASE

CEILING

CHANGEDIRQQ

CHANGEDRIVEQQ

CHAR

CHARACTER

CHDIR

CHMOD

CHUNK (TU*X only)

CLEARSCREEN

CLEARSTATUSFPQQ

CLICKMENUQQ

CLOCK

CLOSE

CMPLX

COMAddObjectReference

COMCLSIDFromProgID

COMCLSIDFromString

COMCreateObjectByGUID

COMCreateObjectByProgID

COMGetActiveObjectByGUID

COMGetActiveObjectByProgID

COMGetFileObject

COMInitialize

COMIsEqualGUID

COMMITQQ

COMMON

COMPLEX

COMQueryInterface

COMReleaseObject

COMStringFromGUID

COMUninitialize

CONJG

CONTAINS

CONTINUE

COPYIN (TU*X only)

COPYIN Clause (TU*X only)

COS

COSD

COSH

COTAN

COTAND

COUNT

CPU_TIME

CRITICAL (TU*X only)

CRITICAL SECTION (TU*X only)

CSHIFT

CTIME

CYCLE

DATA

DATE

DATE_AND_TIME

DBESJ0, DBESJ1, DBESJN, DBESY0, DBESY1, DBESYN

DBLE

DCMPLX

DEALLOCATE

DECLARE and NODECLARE

DECODE

DEFAULT (TU*X only)

DEFINE and UNDEFINE

DEFINE FILE

DELDIRQQ

DELETE

DELETEMENUQQ

DELFILESQQ

Derived Type

%DESCR

DFLOAT

DIGITS

DIM

DIMENSION

DISPLAYCURSOR

DLGEXIT

DLGFLUSH

DLGGET, DLGGETINT, DLGGETLOG, DLGGETCHAR

DLGINIT, DLGINITWITHRESOURCEHANDLE

DLGISDLGMESSAGE, DLGISDLGMESSAGEWITHDLG

DLGMODAL, DLGMODALWITHPARENT

DLGMODELESS

DLGSENDCTRLMESSAGE

DLGSET, DLGSETINT, DLGSETLOG, DLGSETCHAR

DLGSETCTRLEVENTHANDLER

DLGSETRETURN

DLGSETSUB

DLGSETTITLE

DLGUNINIT

DO

DO Directive (TU*X only)

DO WHILE

DOT_PRODUCT

DOUBLE COMPLEX

DOUBLE PRECISION

DPROD

DRAND, DRANDM

DREAL

DTIME (WNT only)

24.4 E to F

ELEMENTAL

ELLIPSE, ELLIPSE_W

ELSE

ELSE Directive

ELSEIF Directive

ELSE IF

ELSEWHERE

ENCODE

END

END DO

ENDFILE

END FORALL

ENDIF Directive

END IF

END INTERFACE

END WHERE

ENTRY

EOF

EOSHIFT

EPSILON

EQUIVALENCE

ERRSNS

ETIME (WNT only)

EXIT

EXIT Subroutine

EXP

EXPONENT

EXTERNAL

FDATE

FGETC

FIND

FINDFILEQQ

FIRSTPRIVATE (TU*X only)

FIXEDFORMLINESIZE

FLOAT

FLOODFILL, FLOODFILL_W

FLOODFILLRGB, FLOODFILLRGB_W

FLOOR

FLUSH

FLUSH Directive (TU*X only)

FOCUSQQ

FOR_CHECK_FLAWED_PENTIUM

FOR_GET_FPE

FOR_RTL_FINISH_

FOR_RTL_INIT_

FOR_SET_FPE

FOR_SET_REENTRANCY

FORALL

FORMAT

FP_CLASS

FPUTC

FRACTION

FREE

FREEFORM and NOFREEFORM

FSEEK

FSTAT

FTELL

FULLPATHQQ

FUNCTION

24.5 G

GERROR

GETACTIVEQQ

GETARCINFO

GETARG

GETBKCOLOR

GETBKCOLORRGB

GETC

GETCHARQQ

GETCOLOR

GETCOLORRGB

GETCONTROLFPQQ (ia32 only)

GETCWD

GETCURRENTPOSITION, GETCURRENTPOSITION_W

GETDAT

GETDRIVEDIRQQ

GETDRIVESIZEQQ

GETDRIVESQQ

GETENV

GETENVQQ

GETEXCEPTIONPTRSQQ

GETEXITQQ

GETFILEINFOQQ

GETFILLMASK

GETFONTINFO

GETGID

GETGTEXTEXTENT

GETGTEXTROTATION

GETHWNDQQ

GETIMAGE, GETIMAGE_W

GETLASTERRORQQ

GETLINESTYLE

GETLOG

GETPHYSCOORD

GETPID

GETPIXEL, GETPIXEL_W

GETPIXELRGB, GETPIXELRGB_W

GETPIXELS

GETPIXELSRGB

GETSTATUSFPQQ (ia32 only)

GETSTRQQ

GETTEXTCOLOR

GETTEXTCOLORRGB

GETTEXTPOSITION

GETTEXTWINDOW

GETTIM

GETUID

GETUNITQQ

GETVIEWCOORD, GETVIEWCOORD_W

GETWINDOWCONFIG

GETWINDOWCOORD

GETWRITEMODE

GETWSIZEQQ

GMTIME

GOTO - Assigned

GOTO - Computed

GOTO - Unconditional

GRSTATUS

24.6 H to I

HOSTNAM

HUGE

IACHAR

IAND

IARGC

IARGCOUNT (VMS only)

IARGPTR

IBCHNG

IBCLR

IBITS

IBSET

ICHAR

IDATE

IDENT

IEOR

IERRNO

IF - Arithmetic

IF - Logical

IF Construct

IF Directive Construct

IF DEFINED

IFIX

ILEN

IMAGESIZE, IMAGESIZE_W

IMPLICIT

INCHARQQ

INCLUDE

INDEX

INITIALIZEFONTS

INITIALSETTINGS

INQFOCUSQQ

INQUIRE

INSERTMENUQQ

INSTANCE (TU*X only)

INT

INTEGER

INTEGER Directive

INTEGERTORGB

INTENT

INTERFACE

INT_PTR_KIND

INTRINSIC

IOR

IRAND, IRANDM

ISHA

ISHC

ISHFT

ISHFTC

ISHL

ISNAN

ITIME

IVDEP

24.7 J to L

JDATE

KILL

KIND

LASTPRIVATE (TU*X only)

LBOUND

LCWRQQ (ia32 only)

LEADZ

LEN

LEN_TRIM

LGE

LGT

LINETO, LINETO_W

LINETOAR

LINETOAREX

LLE

LLT

LNBLNK

LOADIMAGE, LOADIMAGE_W

LOC

%LOC

LOG

LOG10

LOGICAL

LOGICAL Function

LONG

LSHIFT

LSTAT

LTIME

24.8 M to N

MAKEDIRQQ

MALLOC

MAP...END MAP

MASTER (TU*X only)

MATHERRQQ (ia32 only)

MATMUL

MAX

MAXEXPONENT

MAXLOC

MAXVAL

MBCharLen

MBConvertMBToUnicode

MBConvertUnicodeToMB

MBCurMax

MBINCHARQQ

MBINDEX

MBJISToJMS, MBJMSToJIS

MBLead

MBLen

MBLen_Trim

MBLGE, MBLGT, MBLLE, MBLLT, MBLEQ, MBLNE

MBNext

MBPrev

MBSCAN

MBStrLead

MBVERIFY

MERGE

MESSAGE

MESSAGEBOXQQ

MIN

MINEXPONENT

MINLOC

MINVAL

MOD

MODIFYMENUFLAGSQQ

MODIFYMENUROUTINEQQ

MODIFYMENUSTRINGQQ

MODULE

MODULE PROCEDURE

MODULO

MOVETO, MOVETO_W

MP_SCHEDTYPE (TU*X only)

MULT_HIGH (Alpha only)

MVBITS

NAMELIST

NARGS

NEAREST

NINT

NLSEnumCodepages

NLSEnumLocales

NLSFormatCurrency

NLSFormatDate

NLSFormatNumber

NLSFormatTime

NLSGetEnvironmentCodepage

NLSGetLocale

NLSGetLocaleInfo

NLS Date and Time Format

NLSSetEnvironmentCodepage

NLSSetLocale

NOT

NULL

NULLIFY

NUMBER_OF_PROCESSORS

NWORKERS

24.9 O to P

OBJCOMMENT

OPEN

OPTIONAL

OPTIONS

OPTIONS Directive

OR

ORDERED (TU*X only)

OUTGTEXT

OUTTEXT

PACK

PACK Directive

PACKTIMEQQ

PARALLEL (TU*X only)

PARALLEL DO (TU*X only)

PARALLEL SECTIONS (TU*X only)

PARAMETER

PASSDIRKEYSQQ

PAUSE

PDO (TU*X only)

PDONE (TU*X only)

PEEKCHARQQ

PERROR

PIE, PIE_W

POINTER - Fortran 90

POINTER - Compaq Fortran

POLYBEZIER, POLYBEZIER_W

POLYBEZIERTO, POLYBEZIERTO_W

POLYGON, POLYGON_W

POLYLINEQQ

POPCNT

POPPAR

PRECISION

PRESENT

PRINT

PRIVATE

PRIVATE Clause (TU*X only)

PROCESSORS_SHAPE

PRODUCT

PROGRAM

PSECT

PSECTIONS (TU*X only)

PUBLIC

PURE

PUTC

PUTIMAGE, PUTIMAGE_W

24.10 Q to R

QCMPLX (VMS, U*X)

QEXT (VMS, U*X)

QFLOAT (VMS, U*X)

QREAL (VMS, U*X)

QSORT

RADIX

RAISEQQ

RAN

RAND, RANDOM

RANDOM

RANDOM_NUMBER

RANDOM_SEED

RANDU

RANGE

READ

REAL

REAL Directive

REAL Function

RECORD

RECTANGLE, RECTANGLE_W

RECURSIVE

REDUCTION (TU*X only)

%REF

REGISTERMOUSEEVENT

REMAPALLPALETTERGB, REMAPPALETTERGB

RENAME

RENAMEFILEQQ

REPEAT

RESHAPE

RESULT

RETURN

REWIND

REWRITE

RGBTOINTEGER

RINDEX

RRSPACING

RSHIFT

RTC

RUNQQ

24.11 S

SAVE

SAVEIMAGE, SAVEIMAGE_W

SCALE

SCAN

SCROLLTEXTWINDOW

SCWRQQ (ia32 only)

SECNDS

SECTIONS (TU*X only)

SEED

SELECT CASE...END SELECT

SELECTED_INT_KIND

SELECTED_REAL_KIND

SEQUENCE

SETACTIVEQQ

SETBKCOLOR

SETBKCOLORRGB

SETCLIPRGN

SETCOLOR

SETCOLORRGB

SETCONTROLFPQQ (ia32 only)

SETDAT

SETENVQQ

SETERRORMODEQQ

SETEXITQQ

SET_EXPONENT

SETFILEACCESSQQ

SETFILETIMEQQ

SETFILLMASK

SETFONT

SETGTEXTROTATION

SETLINESTYLE

SETMESSAGEQQ

SETMOUSECURSOR

SETPIXEL, SETPIXEL_W

SETPIXELRGB, SETPIXELRGB_W

SETPIXELS

SETPIXELSRGB

SETTEXTCOLOR

SETTEXTCOLORRGB

SETTEXTCURSOR

SETTEXTPOSITION

SETTEXTWINDOW

SETTIM

SETVIEWORG

SETVIEWPORT

SETWINDOW

SETWINDOWCONFIG

SETWINDOWMENUQQ

SETWRITEMODE

SETWSIZEQQ

SHAPE

SHARED (TU*X only)

SHORT

SIGN

SIN

SIND

SINH

SIGNAL

SIGNALQQ

SINGLE (TU*X only)

SINGLE PROCESS (TU*X only)

SIZE

SIZEOF

SLEEP

SLEEPQQ

SNGL

SORTQQ

SPACING

SPLITPATHQQ

SPORT_CANCEL_IO

SPORT_CONNECT

SPORT_GET_HANDLE

SPORT_GET_TIMEOUTS

SPORT_GET_STATE

SPORT_PEEK_DATA

SPORT_PEEK_LINE

SPORT_PURGE

SPORT_READ_DATA

SPORT_READ_LINE

SPORT_RELEASE

SPORT_SET_STATE

SPORT_SET_TIMEOUTS

SPORT_SHOW_STATE

SPORT_SPECIAL_FUNC

SPORT_WRITE_DATA

SPORT_WRITE_LINE

SPREAD

SQRT

SRAND

SSWRQQ (ia32 only)

STAT

Statement Function

STATIC

STOP

STRICT and NOSTRICT

STRUCTURE...END STRUCTURE

SUBROUTINE

SUBTITLE

SUM

SYSTEM

SYSTEM_CLOCK

SYSTEMQQ

24.12 T to Z

TAN

TAND

TANH

TARGET

TASKCOMMON (TU*X only)

THREADPRIVATE (TU*X only)

TIME

TIMEF

TINY

TITLE

TRACEBACKQQ

TRAILZ

TRANSFER

TRANSPOSE

TRIM

TYPE

Type Declarations

UBOUND

UNION...END UNION

UNLINK

UNLOCK

UNPACK

UNPACKTIMEQQ

UNREGISTERMOUSEEVENT

UNROLL

USE

%VAL

VERIFY

VIRTUAL

VOLATILE

WAITONMOUSEEVENT

WHERE

WRAPON

WRITE

XOR

ZEXT

25 Glossary

25.1 Glossary A

25.2 Glossary B

25.3 Glossary C

25.4 Glossary D

25.5 Glossary E

25.6 Glossary F

25.7 Glossary G

25.8 Glossary H

25.9 Glossary I

25.10 Glossary K

25.11 Glossary L

25.12 Glossary M

25.13 Glossary N

25.14 Glossary O

25.15 Glossary P

25.16 Glossary Q

25.17 Glossary R

25.18 Glossary S

25.19 Glossary T

25.20 Glossary U

25.21 Glossary V

25.22 Glossary W

25.23 Glossary Z

Visual Fortran: Error Messages

1 Visual Fortran Run-Time Errors

1.1 Run-Time Errors Having No Numbers and Error Numbers 1 Through 30

1.2 Run-Time Errors 31 Through 60

1.3 Run-Time Errors 61 Through 108

1.4 Run-Time Errors 120 Through 300

1.5 Run-Time Errors 540 Through 569

1.6 Run-Time Errors 570 Through 614

1.7 Run-Time Errors 615 Through 656

1.8 Run-Time Errors 657 Through 689

1.9 Run-Time Errors 690 Through 719

1.10 Run-Time Errors 720 Through 759

2 Linker Tools Messages

2.1 Linker Errors LNK1000 to LNK1149

2.2 Linker Errors LNK1152 to LNK1189

2.3 Linker Errors LNK1190 to LNK1581

2.4 Linker Errors LNK2001 to LNK2014

2.5 Linker Warnings LNK4001 to LNK4039

2.6 Linker Warnings LNK4040 to LNK4069

2.7 Linker Warnings LNK4070 to LNK4099

2.8 Linker Warnings LNK4102 to LNK4549

2.9 Linker Warnings LNK6001 to LNK6026

3 BSCMAKE Messages BK1500 through BK4503

4 C Run-Time Errors R6002 through R6025

5 CVPACK Messages CK1001 through CK4010

6 CVTRES Messages CVT1100 through CVT4001

7 Math Errors M6101 through M6205

8 NMAKE Messages

8.1 NMAKE Errors U1000 to U1049

8.2 NMAKE Errors U1050 to U1100

8.3 NMAKE Error U2001 to Warning U4011

9 Profiler Errors PRF1005 through PRF4642

10 Resource Compiler Messages

10.1 Resource Compiler Errors RC1000 through RC1208

10.2 Resource Compiler Errors RC2001 through RC2129

10.3 Resource Compiler Errors RC2130 through RC2236

10.4 Resource Compiler Warnings RC4000 through RC4413

10.5 Resource Compiler Errors RW1004 through RW4004