DIGITAL Visual FortranProgrammer’s GuideDate: December, 1998Software Version: DIGITAL Visual Fortran Version 6.0, Standard and Professional EditionsOp
Building Programs and Libraries Page 4 of 44How Information Is DisplayedThe Microsoft visual development environment displays information in windows,
Compiler and Linker Options Page 33 of 111zero (0). The program continues. The number of underflowed results are counted and messages are displayed fo
Compiler and Linker Options Page 34 of 111For more information on IEEE floating-point exception handling, see the IEEE Standard for Binary Floating-Po
Compiler and Linker Options Page 35 of 111file://D:\TEMP\~hhD34E.htm 11/23/98language features within the compiler are compatible with Visual Fortran
Compiler and Linker Options Page 36 of 111For example, assume a program OPENTEST contains the following statements: OPEN(UNIT = 2, FILE = ’ ’) OPEN(UN
Compiler and Linker Options Page 37 of 111Note: Allowing files that are not opened with sequential access (such as ACCESS="DIRECT") to be us
Compiler and Linker Options Page 38 of 111The UNFORMATTED specifier returns the value "NO" instead of "UNKNOWN" when it is not kno
Compiler and Linker Options Page 39 of 111Gives direct access formatted files the same record type as Fortran PowerStation when /fpscomp:general is se
Compiler and Linker Options Page 40 of 111Fortran PowerStation semantic conventions and record formats (see Microsoft Fortran PowerStation Compatible
Compiler and Linker Options Page 41 of 111REAL(4) 1PG15.7E2 1PG16.6E2 REAL(8) 1PG24.15E3 1PG25.15E3 COMPLEX(4) ’( ’,1PG14.7E2, ’, ’,1PG14.7E2, ’)
Compiler and Linker Options Page 42 of 111The INQUIRE statement specifiers OPENED, IOFOCUS, EXISTS, and NAMED. The EOF intrinsic function. The BTEST i
Building Programs and Libraries Page 5 of 44Move the mouse pointer into the project window and click the right mouse button. You can now select projec
Compiler and Linker Options Page 43 of 111/granularity:keywordOn Alpha systems, the /granularity option ensures that data of the specified or larger s
Compiler and Linker Options Page 44 of 111for general arguments and for hidden-length character arguments.In the visual development environment, speci
Compiler and Linker Options Page 45 of 111In the visual development environment, specify Custom INCLUDE and USE Path in the Preprocessor Compiler Opti
Compiler and Linker Options Page 46 of 111Prevents the inlining of procedures, except for statement functions. This type of inlining occurs when you s
Compiler and Linker Options Page 47 of 111Integer Kind in the Fortran Data Compiler Option Category. These options are:/integer_size:16 or /4I2 makes
Compiler and Linker Options Page 48 of 1118/libdir:automatic Requests the insertion of linker search path directives for libraries automatically deter
Compiler and Linker Options Page 49 of 111Specifying /libs:static with /nothreads and /dbglibs is equivalent to /MLd.Specifying /libs:static with /thr
Compiler and Linker Options Page 50 of 111Click the Linker tab Select the General category Type the additional library name to be linked with under Ob
Compiler and Linker Options Page 51 of 111/[no]machine_code Syntax:/machine_code or /nomachine_codeThe /machine_code option requests that a machine la
Compiler and Linker Options Page 52 of 111with good performance and error checking. This is the default on Alpha systems (unless the /fast option is s
Building Programs and Libraries Page 6 of 44The first four projects listed in the preceding table are main project types, requiring main programs. The
Compiler and Linker Options Page 53 of 111The /module option controls where the module files (extension MOD) are placed. If you omit this option (or s
Compiler and Linker Options Page 54 of 111/nodefine Syntax:/nodefineThe /nodefine option requests that all symbols specified by the accompanying /defi
Compiler and Linker Options Page 55 of 111The /optimize option controls the level of optimization performed by the compiler. To provide efficient run-
Compiler and Linker Options Page 56 of 111Specifying /Ox sets: /optimize:4, /math_library:check, and /assume:nodummy_aliases. Specifying /Oxp sets: /o
Compiler and Linker Options Page 57 of 111/pad_source or /nopad_source The /pad_source option requests that source records shorter than the statement
Compiler and Linker Options Page 58 of 111in the Optimizations Compiler Option Category. For this version of Visual Fortran, loops chosen for software
Compiler and Linker Options Page 59 of 111/real_size:32 Defines REAL declarations, constants, functions, and intrinsics as REAL(KIND=4) (SINGLE PRECIS
Compiler and Linker Options Page 60 of 111/rounding_mode (Alpha only) Syntax:/rounding_mode:keywordOn Alpha systems, the /rounding_mode option allows
Compiler and Linker Options Page 61 of 111/[no]showSyntax:/show:keyword... or /noshowThe /show option specifies what information is included in a list
Compiler and Linker Options Page 62 of 111The /source or /Tf option indicates that the file is a Fortran source file with a non-standard file extensio
Building Programs and Libraries Page 7 of 44Any graphics routine that your program calls will produce no output, but will return error codes. A progra
Compiler and Linker Options Page 63 of 111compiler under the following circumstances:The statements contain ordinary syntax and semantic errors. A sou
Compiler and Linker Options Page 64 of 111instruction that causes it. This slows program execution, so only specify it when debugging a specific probl
Compiler and Linker Options Page 65 of 111/traceback or /notraceback or /ZtThe /traceback option requests that the compiler generate extra information
Compiler and Linker Options Page 66 of 111The /transform_loops (or /optimize:5) option activates a group of loop transformation optimizations that app
Compiler and Linker Options Page 67 of 111Tuning for a specific implementation can improve run-time performance; it is also possible that code tuned f
Compiler and Linker Options Page 68 of 111Generates and schedules code for the 21164 chip implementations that use the byte and word manipulation inst
Compiler and Linker Options Page 69 of 111and grouping more instructions together to allow efficient overlapped instruction execution (instruction pip
Compiler and Linker Options Page 70 of 111Changes internal file writes using list-directed I/O. A list-directed write to an internal file results in r
Compiler and Linker Options Page 71 of 111If you omit /warn, the defaults are: For the DF command: /warn:(alignments,noargument_checking,nodeclaration
Compiler and Linker Options Page 72 of 111/warn:truncated_source Requests that the compiler issue a warning diagnostic message when it reads a source
Building Programs and Libraries Page 8 of 44building from the command line, you must specify the /libs:qwins option. You cannot use the run-time funct
Compiler and Linker Options Page 73 of 111/watch[:keyword] or /nowatchThe /watch option requests the display of processing information to the console
Compiler and Linker Options Page 74 of 111/[no]threads /[no]dbglibs /fpscomp:libs For information on Fortran Windows Applications, including requestin
Compiler and Linker Options Page 75 of 111Microsoft format (CV), COFF format, or both. /DEF Passes a module-definition (.DEF) file to the linker. /DEF
Compiler and Linker Options Page 76 of 111/MACHINE Specifies the target platform for the program./MAP Informs the linker to generate a mapfile. You ca
Compiler and Linker Options Page 77 of 111to the Output window./VERSION Informs the linker to put a version number in the header of the executable fil
Compiler and Linker Options Page 78 of 111/PROFILE General Category /STACK Output Category /VERBOSE Customize Category /VERSION Output Category Be
Compiler and Linker Options Page 79 of 111Input category Command-line equivalent Object/Library Modules filename on command line Ignore Libraries /N
Compiler and Linker Options Page 80 of 111Specify numeric arguments in decimal or C-language notation. (The digits 1-9 specify decimal values, an inte
Compiler and Linker Options Page 81 of 111program. Indicate a comment by a semicolon (;). Comments can be on the same or a separate line. The linker i
Compiler and Linker Options Page 82 of 111An executable file or DLL created for debugging contains the name and path of the corresponding PDB. Visual
Building Programs and Libraries Page 9 of 44You cannot make a QuickWin application a DLL. For information on how to use QuickWin functions, including
Compiler and Linker Options Page 83 of 111/DEBUGTYPE:BOTH This option generates both COFF debugging information and old-style Microsoft debugging info
Compiler and Linker Options Page 84 of 111/DELAYSyntax:/DELAY[:dllname] Controls delayed loading of DDLs: The unload qualifier tells the delay-load he
Compiler and Linker Options Page 85 of 111In the visual development environment, you can set this option by choosing Dynamic-Link Library under Projec
Compiler and Linker Options Page 86 of 111Syntax:/EXETYPE:DYNAMICUsed when building a virtual device driver (VxD). A VxD is linked using the /VXD opti
Compiler and Linker Options Page 87 of 111and how to use decorated names, see Adjusting Naming Conventions in Mixed-Language Programming. /FIXEDSyntax
Compiler and Linker Options Page 88 of 111/GPSIZE:numFor Alpha systems, controls whether communal variables (uninitialized global data items) are allo
Compiler and Linker Options Page 89 of 111/IMPORTSyntax:/IMPORTThis option is specific to MACOS and does not apply to Visual Fortran. /INCLUDESyntax:/
Compiler and Linker Options Page 90 of 111options are incompatible with incremental linking. LINK performs a full link if any of the following options
Compiler and Linker Options Page 91 of 111Syntax:/LINK50COMPATGenerates import libraries in the old (Visual C++ version 5.0) format for backward compa
Compiler and Linker Options Page 92 of 111Syntax:/MAPINFO:{EXPORTS|FIXUPS|LINES}Informs the linker to include the specified information in a map file,
Building Programs and Libraries Page 10 of 44See the online title Platform SDK for information on calling Win32 routines. The full Win32 API set is do
Compiler and Linker Options Page 93 of 111/NOENTRYSyntax:/NOENTRYThis option is required for creating a resource-only DLL. Use this option to prevent
Compiler and Linker Options Page 94 of 111Syntax:/ORDER:@filenameLets you perform optimization by telling LINK to place certain packaged functions int
Compiler and Linker Options Page 95 of 111The /OUT option controls the default base name for a mapfile or import library. For details, see the descrip
Compiler and Linker Options Page 96 of 111If SEPT[YPES] is specified, linking can be significantly faster. The advantages are: The debugger startup ti
Compiler and Linker Options Page 97 of 111/SECTIONSyntax:/SECTION:name,[E][C][I][R][W][S][D][K][L][P][X] Changes the properties of a section, overridi
Compiler and Linker Options Page 98 of 111Syntax:/STACK:reserve[,commit] Sets the size of the stack in bytes. The reserve argument specifies the total
Compiler and Linker Options Page 99 of 111in the MS-DOS Stub File Name box in the Input category of the Link tab of the Project Settings dialog box. /
Compiler and Linker Options Page 100 of 111/VERBOSESyntax:/VERBOSE[:LIB] The linker sends information about the progress of the linking session to the
Compiler and Linker Options Page 101 of 111Driver Kit. A .VXD file is not in Common Object File Format, and it cannot be used with DUMPBIN or EDITBIN.
Compiler and Linker Options Page 102 of 111Module-Definition Files A module-definition (.DEF) file is a text file that contains statements that define
Building Programs and Libraries Page 11 of 44You add static libraries to a main project in the visual development environment with the Add to Project,
Compiler and Linker Options Page 103 of 111Many statements have an equivalent LINK command-line option. See the Linker Options and Related Information
Compiler and Linker Options Page 104 of 111LIBRARY [library] [BASE=address] This statement tells LINK to create a DLL. LINK creates an import library
Compiler and Linker Options Page 105 of 111option. Linker Reserved WordsThe following table lists words reserved by the linker. You can use these name
Compiler and Linker Options Page 106 of 111Microsoft Fortran PowerStation Command-Line CompatibilityThis section provides compatibility information fo
Compiler and Linker Options Page 107 of 111Activate the same compiler, the DIGITAL Fortran compiler. For new programs and most existing applications,
Compiler and Linker Options Page 108 of 111/FA Assembly listing. Specify /noasmattributes with /asmfile[:file] or /FA. /FAc Assembly listing with ma
Compiler and Linker Options Page 109 of 111/4Lnn Line length for Fortran 90 fixed-form source (nn is 72, 80, or 132). Specify /extend_source[:nn] or /
Compiler and Linker Options Page 110 of 111/dll:file, or /Fe[file] /Fm[file] Controls creation of link map file. Specify /map[:file] or /Fm[file] /Fo
Compiler and Linker Options Page 111 of 111/V"string" Place string in object file. Specify /bintext:string or /V"string" /Z7 Req
Debugging Fortran Programs Page 1 of 22Debugging Fortran ProgramsAlthough you can use the command line to develop your programs, Visual Fortran progra
Building Programs and Libraries Page 12 of 44time library stored in a separate DLL. For more information about DLLs, see:Creating Fortran DLLsDefining
Debugging Fortran Programs Page 2 of 226.In the Build menu, click Set Active Configuration and select the debug configuration.7.To check your Project
Debugging Fortran Programs Page 3 of 223.Start the Microsoft visual development environment.4.In the File menu, click the Open Workspace item. Specify
Debugging Fortran Programs Page 4 of 226.Set breakpoints in the source file and debug the program, as described in Debugging the Squares Example Progr
Debugging Fortran Programs Page 5 of 22When the program was executed with array bounds checking on, the output appears as follows: You can either buil
Debugging Fortran Programs Page 6 of 22The following toolbars are shown:Build toolbar Standard toolbar Fortran toolbar To change the displayed toolbar
Debugging Fortran Programs Page 7 of 22The red circle in the left margin of the text editor/debugger window shows where a breakpoint is set. 7.This ex
Debugging Fortran Programs Page 8 of 22The Debug menu appears on the visual development environment title bar in place of the Build menu. If not displ
Debugging Fortran Programs Page 9 of 229.Repeat the Step Over action and follow program execution into the DO loop. Repeat the Step Over action until
Debugging Fortran Programs Page 10 of 22In the Build menu, click Build Squares.exeIn the Build menu, click Execute Squares.exe or click the exclamatio
Debugging Fortran Programs Page 11 of 2214.In the Variables window, click the Locals tab to display the values of your local variables: You can view t
Building Programs and Libraries Page 13 of 44To add files to an existing project:To add an existing file to the project:1.If not already open, open th
Debugging Fortran Programs Page 12 of 22The Variables window displays a Context menu (after the word Context:). The Context menu can help you debug ex
Debugging Fortran Programs Page 13 of 2216.Also drag the OUTARR array name to the Watch window. Click on the Plus sign (+) to the left of the OUTARR v
Debugging Fortran Programs Page 14 of 22If you have the Visual Fortran Professional Edition, you can use the Array Viewer to display and graph multidi
Debugging Fortran Programs Page 15 of 22 integer foo(10)You can specify the following statement in a watch window to see the 2nd, 5th, and 8th elemen
Debugging Fortran Programs Page 16 of 22You can change the display format of variables in the Watch window using the formatting symbols in the followi
Debugging Fortran Programs Page 17 of 22md 4 doublewords 0x0012ffac 00CB34B3 80943084 308A22FF 00002657With the memory location formatting symbols, yo
Debugging Fortran Programs Page 18 of 224.In the debug menu, click Fortran Array Viewer or click the Array Viewer button in the Fortran toolbar:
Debugging Fortran Programs Page 19 of 22To display the Fortran toolbar:1.In the Tools menu, select Customize. 2.Click the Toolbars tab. 3.Set the Fort
Debugging Fortran Programs Page 20 of 22Create another instance of Array Viewer with an updated view of the data by clicking the Fortran Arrays button
Debugging Fortran Programs Page 21 of 22If you specify the /fpe:3 compiler option, certain floating-point exceptions will not be caught, since this se
Copyright Page Digital Equipment Corporation makes no representations that the use of its products in the mannerdescribed in this publication will not
Building Programs and Libraries Page 14 of 442.The Insert Files into Project dialog box appears. Use this dialog box to select the Fortran files to be
Debugging Fortran Programs Page 22 of 22for the routine (use the arrow at the right to display selections). This action all occurs after the error mes
Performance: Making Programs Run Faster Page 1 of 51Performance: Making Programs Run FasterThis chapter discusses the following topics related to impr
Performance: Making Programs Run Faster Page 2 of 51To ensure that your software development environment can significantly improve the run-time perfor
Performance: Making Programs Run Faster Page 3 of 51together. For information on creating (exporting) makefile for command-line use, see Files in a Pr
Performance: Making Programs Run Faster Page 4 of 51/fast Sets the following performance-related options: /align:dcommons, /assume:noaccuracy_sensiti
Performance: Making Programs Run Faster Page 5 of 51types of optimizations performed. The default optimization level is /optimize:4, unless you specif
Performance: Making Programs Run Faster Page 6 of 51routines (used by intrinsic functions) that provide faster speed. Using this option may cause a sl
Performance: Making Programs Run Faster Page 7 of 51compiling multiple source files, also specify /object:file to compile many source files together i
Performance: Making Programs Run Faster Page 8 of 51/synchronous_exceptions (Alpha only)Generates extra code to associate an arithmetic exception with
Performance: Making Programs Run Faster Page 9 of 51Methods of Timing Your ApplicationTo perform application timings, use a version of the TIME comman
Building Programs and Libraries Page 15 of 44A Project workspace file - Has the extension .DSW. It stores project workspace information. A Project fil
Performance: Making Programs Run Faster Page 10 of 51time <nul | findstr currentrem start the program we are interested in, this time usingrem cmd
Performance: Making Programs Run Faster Page 11 of 51The time spent in functions and the number of times a function was called (function timing). Only
Performance: Making Programs Run Faster Page 12 of 51performance bottlenecks. Other performance tools are available in the Microsoft® Win32 SDK (see t
Performance: Making Programs Run Faster Page 13 of 51Options Controlling AlignmentCauses of Unaligned Data and Ensuring Natural AlignmentCommon blocks
Performance: Making Programs Run Faster Page 14 of 51Equivalenced data EQUIVALENCE statements can force unaligned data or cause data to span natural b
Performance: Making Programs Run Faster Page 15 of 51For More Information:On the /align options, see Options Controlling Alignment. Checking for Ineff
Performance: Making Programs Run Faster Page 16 of 51Arranging Data Items in Derived-Type DataArranging Data Items in Digital Fortran Record Structure
Performance: Making Programs Run Faster Page 17 of 51As shown in the following figure, if you arrange the order of variables from largest to smallest
Performance: Making Programs Run Faster Page 18 of 51inserted by the compiler when the /align records option is in effect. Derived-Type Naturally Alig
Performance: Making Programs Run Faster Page 19 of 51record structures: The /align:commons option Requests that data in common blocks be aligned on up
Building Programs and Libraries Page 16 of 44If you use a foreign makefile for a project, the visual development environment calls NMAKE to perform th
Performance: Making Programs Run Faster Page 20 of 51performance, especially when using large arrays. This section discusses the following topics: Acc
Performance: Making Programs Run Faster Page 21 of 51leftmost subscript varies most rapidly with a stride of one. Whole array access uses column-major
Performance: Making Programs Run Faster Page 22 of 51 INTEGER X(5,3), Y(5,3), I, J Y = 0 DO I=1,3 ! I outer loop varies slowest
Performance: Making Programs Run Faster Page 23 of 51performance, but at the expense of some unused elements. Because loop index variables I and J are
Performance: Making Programs Run Faster Page 24 of 51Output Argument Array Types Input Arguments Array Types Explicit-Shape Arrays Deferred-Shape and
Performance: Making Programs Run Faster Page 25 of 51The following sections discuss I/O performance considerations in more detail: Use Unformatted Fil
Performance: Making Programs Run Faster Page 26 of 51If the whole array is not being written, natural storage order is the best order possible. If you
Performance: Making Programs Run Faster Page 27 of 51 S1 WRITE (6,400) (A(I), I=1,N) 400 FORMAT (1X, <N> F5.2)
Performance: Making Programs Run Faster Page 28 of 51of space in the block is wasted. Avoid using values larger than the block capacity, because they
Performance: Making Programs Run Faster Page 29 of 51To minimize data storage and memory cache misses with arrays, use 32-bit data rather than 64-bit
Building Programs and Libraries Page 17 of 44debug information and no optimizations, whereas the default release configuration supplies minimal debug
Performance: Making Programs Run Faster Page 30 of 51Integer (also see Avoid Small Integer and Small Logical Data Items (Alpha only))Single-precision
Performance: Making Programs Run Faster Page 31 of 51For more information, see Compile With Appropriate Options and Multiple Source Files. Code DO Loo
Performance: Making Programs Run Faster Page 32 of 51Loop transformation xAutomatic inlining x xAdditional global optimizations x x xGlobal optimizati
Performance: Making Programs Run Faster Page 33 of 51The following sections discuss I/O performance considerations in more detail: Optimizations Perfo
Performance: Making Programs Run Faster Page 34 of 51higher). Implied-DO loop collapsing DO loop collapsing reduces a major overhead in I/O processing
Performance: Making Programs Run Faster Page 35 of 51DIMENSION A(25,25), B(25,25)A(I,J) = B(I,J)Without optimization, these statements can be coded as
Performance: Making Programs Run Faster Page 36 of 51Lower-ranked constants are converted to the data type of the higher-ranked operand: REAL X, YX =
Performance: Making Programs Run Faster Page 37 of 51 . IF (I.GT.1) GOTO 1010 A(I) = 3.0*QDead Store EliminationIf a variable is assigned but ne
Performance: Making Programs Run Faster Page 38 of 51 . . .X = SIN(Y)*V . . .V = PI*X . . .Y = COS(Y)*VVisual Fortran may choose one
Performance: Making Programs Run Faster Page 39 of 51Global optimizations include: Data-flow analysis Split lifetime analysis Strength reduction (repl
Building Programs and Libraries Page 18 of 44configuration level. You can set options at the following levels within a configuration: Configuration le
Performance: Making Programs Run Faster Page 40 of 51Visual Fortran limits optimizations on data items in common blocks. If common block data items ar
Performance: Making Programs Run Faster Page 41 of 51Loop UnrollingAt optimization level /optimize:3 or above, Visual Fortran attempts to unroll certa
Performance: Making Programs Run Faster Page 42 of 51 . . . branch to exit1 . . .exit1: move 1 into R0 return
Performance: Making Programs Run Faster Page 43 of 51Use of constant arguments You can specify: One of the /optimize options to control the optimizati
Performance: Making Programs Run Faster Page 44 of 51can improve the performance of the memory system and usually apply to multiple nested loops. The
Performance: Making Programs Run Faster Page 45 of 51Loop unrolling (enabled at /optimize:3 or above) cannot schedule across iterations of a loop. Bec
Performance: Making Programs Run Faster Page 46 of 51other compiler options can prevent or facilitate improved optimizations, as discussed in the foll
Performance: Making Programs Run Faster Page 47 of 51/inline:manualInlines statement functions but not other procedures. This type of inlining occurs
Performance: Making Programs Run Faster Page 48 of 51Unoptimized Code Optimized Code DO I=1,N...B(I)= A(I)/VEND DOT= 1/VDO I=1,N...B(I)= A(I)*TEND DOT
Performance: Making Programs Run Faster Page 49 of 51 IF (N.LE.0) RETURN IF (DA.EQ.0.0) RETURN IF (INCX.EQ.1.AND.INCY.EQ.1) GOTO 20C
Building Programs and Libraries Page 19 of 44The linker builds an executable program (.EXE), static library (.LIB), or dynamic-link library (.DLL) fil
Performance: Making Programs Run Faster Page 50 of 51On Alpha systems, regardless of the specified keyword, the generated code will run correctly on a
Performance: Making Programs Run Faster Page 51 of 51For more information, see /architecture.
Using QuickWin Page 1 of 32Using QuickWinThis chapter introduces the major categories of QuickWin library routines. It gives an overview of QuickWin f
Using QuickWin Page 2 of 32QuickWin Programming PrecautionsSimulating Nonblocking I/OCapabilities of QuickWinYou can use the QuickWin library to do th
Using QuickWin Page 3 of 32applications support only one window and do not support programmable menus. Fortran QuickWin applications support multiple
Using QuickWin Page 4 of 32Fortran QuickWin Graphics ApplicationsThe following shows a typical Fortran QuickWin application. The frame window has a bo
Using QuickWin Page 5 of 32All QuickWin applications create an application or frame window; child windows are optional. Fortran Standard Graphics appl
Using QuickWin Page 6 of 32The resulting graphics might appear somewhat distorted whenever the logical graphics screen is enlarged or reduced with the
Using QuickWin Page 7 of 32Depending on the type of routines used by your application, other USE statements that include other Visual Fortran modules
Using QuickWin Page 8 of 32resolution will be set for your system, given the other fields you specify, if any. You can set the actual size of the wind
Building Programs and Libraries Page 20 of 444.The Tool Combo box allows you to view the project settings for either the Fortran or the displayed tool
Using QuickWin Page 9 of 32becomes the active window. When a window gains focus, the window that previously had focus will lose focus. If a window nee
Using QuickWin Page 10 of 32 WRITE (11, *) ’Giving focus to Child 2.’ ! Give focus to Child Window 1 with the FOCUSQQ function: status =
Using QuickWin Page 11 of 32 ! Get maximum size of frame window. status = GETWSIZEQQ(QWIN$FRAMEWINDOW, QWIN$SIZEMAX, winfo) WRITE (*,*) &qu
Using QuickWin Page 12 of 32SETGTEXTROTATION sets the current orientation for font text output, and GETGTEXTROTATION returns the current setting. The
Using QuickWin Page 13 of 32specified values. See the Visual Fortran Sample SINE.F90 in the ...\DF98\SAMPLES\TUTORIALfolder for an example of this tec
Using QuickWin Page 14 of 32SETBKCOLORRGB (or SETBKCOLOR) retrieve or set the current background color. GETFILLMASK and SETFILLMASK return or set the
Using QuickWin Page 15 of 32ELLIPSE, ELLIPSE_W Draws an ellipse or circle FLOODFILL, FLOODFILL_W Fills an enclosed area of the screen with the current
Using QuickWin Page 16 of 32SETPIXELSRGB Set the Red-Green-Blue color value of multiple pixels Most of these routines have multiple forms. Routine nam
Using QuickWin Page 17 of 32GETTEXTCOLORRGB Returns the current text Red-Green-Blue color value GETTEXTPOSITION Returns the current text-output positi
Using QuickWin Page 18 of 32Routine DescriptionGETFONTINFO Returns the current font characteristics GETGTEXTEXTENT Determines the width of specified t
Building Programs and Libraries Page 21 of 442.For the selected Fortran project type, a list of saved Fortran environments appears. Select a Fortran e
Using QuickWin Page 19 of 32These routines allow you to cut, paste, and move images around the screen. Transferring Images in MemoryThe GETIMAGE and P
Using QuickWin Page 20 of 32Once you have selected a portion of the screen, you can copy it onto the Clipboard by using the Edit/Copy option or by usi
Using QuickWin Page 21 of 32Menu items CLICKMENUQQ Simulates the effect of clicking or selecting a menu item APPENDMENUQQ Appends a menu item DELETEM
Using QuickWin Page 22 of 32Program Control of MenusYou do not have to use the default QuickWin menus. You can eliminate and alter menus, menu item li
Using QuickWin Page 23 of 32 PROGRAM MENUS USE DFLIB LOGICAL(4) res INTERFACE LOGICAL(4) FUNCTION INITIALSETTINGS END FUNCTION
Using QuickWin Page 24 of 32menu item’s state might not be properly updated when you change it (put a check mark next to it, gray it out, or disable,
Using QuickWin Page 25 of 32WINTILE, and uses MODIFYMENUFLAGSQQ to put a check mark next to the menu item: status = MODIFYMENUSTRINGQQ( 1, 4, ’Tile
Using QuickWin Page 26 of 32 USE DFLIB INTEGER(4) response response = MESSAGEBOXQQ(’Retry or Cancel?’C, ’Smith Chart & & Simulator’C,
Using QuickWin Page 27 of 324.Create a script file to hold your icons. Select File/Save As. You will be prompted for the name of the script file that
Using QuickWin Page 28 of 32For example: USE DFLIB INTEGER(4) result OPEN (4, FILE= ’USER’) ... result = REGISTERMOUSEEVENT (4, MOUSE$LBUTTONDBL
Building Programs and Libraries Page 22 of 442.Initially, this dialog box displays the project types for which there are saved Fortran environments. D
Using QuickWin Page 29 of 32 END SUBROUTINE END INTERFACEThe unit parameter is the unit number associated with the child window where events are t
Using QuickWin Page 30 of 32 if ((MOUSE$KS_CONTROL .AND. keystate) == MOUSE$KS_CONTROL) then & & write (*,*) ’Ctrl key was down’Your
Using QuickWin Page 31 of 32When QuickWin has two blocking calls pending, it displays a message in the status bar that corresponds to the blocking cal
Using QuickWin Page 32 of 32One way to simulate PEEKCHARQQ with QuickWin applications is to use a multithread application. One thread does a READ or G
Creating Fortran DLLs Page 1 of 10Creating Fortran DLLsA dynamic-link library (DLL) contains one or more subprogram procedures (functions or subroutin
Creating Fortran DLLs Page 2 of 10Coding requirements include using cDEC$ ATTRIBUTES DLLIMPORT and DLLEXPORT compiler directives. Variables and routin
Creating Fortran DLLs Page 3 of 103.Build the DLL and then build the main program, as described in Building and Using Dynamic-Link Libraries. Fortran
Creating Fortran DLLs Page 4 of 10DLLEXPORT compiler directives. These directives enable the compiler and linker to map to the correct portions of the
Creating Fortran DLLs Page 5 of 10 REAL C, B, A, Q EQUIVALENCE (A,Q) END SUBROUTINE SETA END INTERFACE A = 0. I = 0 WRITE
Creating Fortran DLLs Page 6 of 10For more information, see: Building Dynamic-Link LibrariesThe DLL Build OutputChecking the DLL Symbol Export TableBu
Building Programs and Libraries Page 23 of 44Browser information is off by default for projects, but you can turn it on if you wish. To set the browse
Creating Fortran DLLs Page 7 of 105.Build your Fortran DLL project. The Microsoft visual development environment automatically selects the correct lin
Creating Fortran DLLs Page 8 of 10enabled library. For more information, see: The DLL Build OutputChecking the DLL Symbol Export TableBuilding Executa
Creating Fortran DLLs Page 9 of 10category (the /alignment option) as was used to create the DLL:Consistently specify whether padding is needed to ens
Creating Fortran DLLs Page 10 of 10 DF /align:commons mainapp.f90 dllfile.libDLL Sample ProgramsVisual Fortran provides Sample programs are installed
Creating Windows Applications Page 1 of 5Creating Windows ApplicationsWith Visual Fortran, you can build Fortran applications that are also fully-feat
Creating Windows Applications Page 2 of 5Sample Fortran Windows Applications Getting Help with Windows Programming Coding Requirements for Fortran Win
Creating Windows Applications Page 3 of 5 integer function WinMain( hInstance, hPrevInstance, lpszCmdLine, nCmdShow ) !DEC$ IF DEFINED(_X86_) !DEC$ AT
Creating Windows Applications Page 4 of 5 structurename$bitfieldnameThese functions take an integer argument and return an integer. All bit fields ar
Creating Windows Applications Page 5 of 5The Visual Fortran Samples ...\DF98\SAMPLES\ADVANCED folder contains many Fortran Windows applications that d
Portability and Design Considerations Page 1 of 16Portability and Design ConsiderationsBefore you can start to write new programs or port existing one
Introduction to the Programmer’s Guide Page 1 of 4Introduction to the Programmer’s GuideThe Programmer’s Guide contains the following information (thi
Building Programs and Libraries Page 24 of 44When you select Build projectname from the Build menu (or one of the Build toolbars), the visual developm
Portability and Design Considerations Page 2 of 16FORTRAN IV American National Standard Programming Language FORTRAN, ANSI X3.9-1966. This was the fir
Portability and Design Considerations Page 3 of 16on a wide range of platforms, and if a system you are porting a program to supports an extension, th
Portability and Design Considerations Page 4 of 16The operating system envelops your program and influences it both externally and internally. To achi
Portability and Design Considerations Page 5 of 16Size of Basic TypesThe intrinsic data types are INTEGER, REAL, LOGICAL, COMPLEX, and CHARACTER, whos
Portability and Design Considerations Page 6 of 16For more information, see: Big End or Little End Ordering Binary Representations Declaring Data Type
Portability and Design Considerations Page 7 of 16If you serially transfer bytes now from the Big End words to the Little End words (BE byte 0 to LE b
Portability and Design Considerations Page 8 of 16representation. Additionally, the bit representation of binary floating-point numbers is not unique.
Portability and Design Considerations Page 9 of 16assistance using this or any other dialog box, choose the Help button in the dialog box.)The visual
Portability and Design Considerations Page 10 of 16Fortran console applications are the most portable to other systems because they are text-only and
Portability and Design Considerations Page 11 of 16The simplest way to build an application is to compile all of your Visual Fortran source files (.FO
Building Programs and Libraries Page 25 of 44You can force the build engine to recompile all source files in the project by selecting Rebuild All from
Portability and Design Considerations Page 12 of 16Internal procedures have the advantage of host association, that is, variables declared and used in
Portability and Design Considerations Page 13 of 16Mixed-Language IssuesPorting Data Between SystemsPorting Fortran Source Code Between SystemsIn gene
Portability and Design Considerations Page 14 of 16example, by specifying ANSI/ISO syntax adherence in the Project Settings (Fortran tab) dialog box o
Portability and Design Considerations Page 15 of 16If you try to transfer unformatted binary data between systems, you need to be aware of the differe
Portability and Design Considerations Page 16 of 16You can take further advantage of preemptive multitasking by designing your program so that portion
Using Dialogs Page 1 of 31Using DialogsDialogs are a user-friendly way to solicit application control. As your application executes, you can make a di
Using Dialogs Page 2 of 311.From the Insert menu, choose Resource. 2.From the list of possible resources, choose Dialog. 3.Click the New button. The d
Using Dialogs Page 3 of 31To specify the names and properties of the added controls 1.Click twice on one of the controls in your dialog box with the l
Using Dialogs Page 4 of 31To use the controls from within a program, you need symbolic names for each of them. In this example, the Horizontal Scroll
Using Dialogs Page 5 of 31Figure: Dialog Editor Sample 4 To save the dialog box as a resource file 1.From the File menu, choose Save As. 2.Enter a res
Building Programs and Libraries Page 26 of 44Array elements per dimension 2,147,483,647 or process limitConstants; character and Hollerith 2000 char
Using Dialogs Page 6 of 31environment saves the resource file and creates an include file with the name RESOURCE.FD. At this point the appearance of t
Using Dialogs Page 7 of 31Each control in a dialog box has a unique integer identifier. When the Resource Editor creates the include file (.FD), it as
Using Dialogs Page 8 of 31This code associates the dialog type with the dialog (IDD_TEMP in this example) defined in your resource and include files (
Using Dialogs Page 9 of 31example: retlog = DlgSet( dlg, IDC_SCROLLBAR_TEMPERATURE, 200, DLG_RANGEMAX)In this statement, the dialog function DLGSET as
Using Dialogs Page 10 of 31 SUBROUTINE UpdateTemp( dlg, control_name, callbacktype ) USE DFLOGM IMPLICIT NONE TYPE (dialog) dlg INTEGER control_n
Using Dialogs Page 11 of 31 user’s action. Calling DLGSET does not cause a callback to be called for the changing value of a control. In particular, w
Using Dialogs Page 12 of 31 lret = DlgSetSub(dlg_thermometer, IDD_THERMOMETER, ThermometerSub) lret = DlgSet(dlg_thermometer, IDC_PROGRESS1, 32,
Using Dialogs Page 13 of 31DLGGETCHAR Gets the value of a character control variable DLGGETINT Gets the value of an integer control variable DLGGETLOG
Using Dialogs Page 14 of 31Scroll bar position Scroll bar minimum range Scroll bar maximum range Position change if the user clicks on the scroll bar
Using Dialogs Page 15 of 31DLG_DBLCLICK A subroutine called when a control is double-clicked DLG_DEFAULT Same as not specifying a control index DLG_
Building Programs and Libraries Page 27 of 44If your program is multithreaded, Windows NT starts each thread on whichever processor is available at th
Using Dialogs Page 16 of 31The control identifier specified in DLGSETSUB can also be the identifier of the dialog box. In this case, the index must be
Using Dialogs Page 17 of 31Sets or returns the text of a particular item Drop-down list boxUse DLG_NUMITEMS or DLG_STATE: DLG_NUMITEMS (default) Sets
Using Dialogs Page 18 of 31An index, 1 to nDetermines which list items have been selected and their order DLG_ADDSTRINGUsed with DLGSETCHAR to add a n
Using Dialogs Page 19 of 31Tab controlUse DLG_NUMITEMS (default), DLG_STATE, or an index: DLG_NUMITEMS Sets or returns the total number of tabs DLG_ST
Using Dialogs Page 20 of 31or DLGSETLOG: retlog = DLGSETLOG (dlg, IDC_TEXT_CELSIUS, .FALSE., DLG_ENABLE)retlog = DLGSET (dlg, IDC_TEXT_CELSIUS, .FALSE
Using Dialogs Page 21 of 31default, the tab order of the controls follows the order in which they were created. This may not be the order you want. Yo
Using Dialogs Page 22 of 31by the user are interpreted by your application as character strings. Likewise, numbers you write to the Edit box are sent
Using Dialogs Page 23 of 31Disabling the Group box disables the hotkey, but does not disable any of the controls within the group. As a matter of styl
Using Dialogs Page 24 of 31a Combo box, only one selection can be made at a time in a Drop-down list box, but, like a List box, the selected value can
Using Dialogs Page 25 of 31If Larry alone had been selected, the List box selection index values would be: Selection index Value1 2 (for Larry) 2 0
Building Programs and Libraries Page 28 of 44The redirection portion of the syntax must appear last on the command line. You can append the output to
Using Dialogs Page 26 of 31lowercase letters. For example, if the List box in the example above with the list "Moe," "Larry,"&quo
Using Dialogs Page 27 of 31Like List boxes, Combo boxes can be specified as sorted or unsorted. The notes about sorted List boxes also apply to sorted
Using Dialogs Page 28 of 31You can also set the increment taken when the user clicks in the blank area above or below the slide in a vertical Scroll b
Using Dialogs Page 29 of 31The Spin Control calls the DLG_CHANGE callback whenever the user changes the current value of the control. The Spin control
Using Dialogs Page 30 of 311.Set the "Style" to "Child" 2.Set "Border" to "None" 3.Uncheck "Title Bar&quo
Using Dialogs Page 31 of 31DLGEXIT returns control back to the dialog manager, not immediately after calling DLGEXIT. That is, if there are other stat
Drawing Graphics Elements Page 1 of 22Drawing Graphics ElementsThe graphics routines provided with Visual Fortran set points, draw lines, draw text, c
Drawing Graphics Elements Page 2 of 22\INCLUDE subdirectory defines a derived type, windowconfig, that GETWINDOWCONFIG uses as a parameter: TYPE wind
Drawing Graphics Elements Page 3 of 22Like many programs, graphics programs work well when written in small units. Using discrete routines aids debugg
Drawing Graphics Elements Page 4 of 22Activating a Graphics ModeIf you call a graphics routine without setting a graphics mode with SETWINDOWCONFIG, Q
Building Programs and Libraries Page 29 of 44a.In the Configurations dialog box, click the Add button. The Add Project Configuration dialog box appear
Drawing Graphics Elements Page 5 of 22 ! INTEGER(2) FUNCTION newy( ycoord ) INTEGER(2) ycoord, maxx, maxy REAL(4) tempy COMMON ma
Drawing Graphics Elements Page 6 of 22Because the coordinates for the two corners are ( 0, 0 ) and ( maxx, maxy ), the call to RECTANGLE frames the en
Drawing Graphics Elements Page 7 of 22 EXTERNAL newx, newy PARAMETER ( PI = 3.14159 ) ! ! Calculate each position and display
Drawing Graphics Elements Page 8 of 22ELLIPSE draws an ellipse using parameters similar to those for RECTANGLE. It, too, requires a fill flag and two
Drawing Graphics Elements Page 9 of 22If you use a palette, you are restricted to the colors available in the palette. In order to access all colors a
Drawing Graphics Elements Page 10 of 22Dull Yellow #008080 Bright Yellow #00FFFF Dull Blue #800000 Bright Blue #FF0000 Dull Magenta #800080 Br
Drawing Graphics Elements Page 11 of 22If you request an RGB color that is not in the palette, the color selected from the palette is the closest appr
Drawing Graphics Elements Page 12 of 22Several different coordinate systems are supported by the Visual Fortran QuickWin Library. Text coordinates wor
Drawing Graphics Elements Page 13 of 22Figure: Physical Coordinates The upper-left corner is the origin. The x- and y-coordinates for the origin are a
Drawing Graphics Elements Page 14 of 22The default clipping region occupies the entire screen. The QuickWin Library ignores any attempts to draw outsi
Building Programs and Libraries Page 30 of 44To Locate: Look: Roadmap to the Samples On the Visual Fortran CD-ROM, open the file: Info\Df\Samples\Sa
Drawing Graphics Elements Page 15 of 22Window Coordinates Functions that refer to coordinates on the client-area screen and within the viewport requir
Drawing Graphics Elements Page 16 of 22axis into a small range (such as 151.25 to 151.45) or into a large range (-50000.0 to +80000.0), depending on t
Drawing Graphics Elements Page 17 of 22The gridshape subroutine, which draws the graphs, uses the same data in each case. However, the program uses th
Drawing Graphics Elements Page 18 of 22 ! First window ! CALL SETVIEWPORT( INT2(0), INT2(0), halfx - 1, halfy - 1 ) CALL SETTEXTWINDOW(
Drawing Graphics Elements Page 19 of 22window. The gridshape subroutine plots the data on the screen. ! GRIDSHAPE - This subroutine plots data for R
Drawing Graphics Elements Page 20 of 22 ENDThe routine names that end with _W work in the same way as their viewport equivalents, except that yo
Drawing Graphics Elements Page 21 of 22The OpenGL Reference Manual, Addison-Wesley, ISBN 0-201-46140-4.The OpenGL Programming Guide, Addison-Wesley, I
Drawing Graphics Elements Page 22 of 22GLuint, GLenum, GLbitfield INTEGER(4) GLvoid not needed pointers INTEGER Visual Fortran Samples that use Ope
Using Fonts from the Graphics Library Page 1 of 4Using Fonts from the Graphics LibraryThe Visual Fortran Graphics Library includes routines that print
Using Fonts from the Graphics Library Page 2 of 4TrueType text to any size, but the characters sometimes don’t look quite as solid as the bitmapped ch
Building Programs and Libraries Page 31 of 44DLL Samples Mixed-Language Programming SamplesQuickWin Programming Samples Scientific Graphing (SciGraph)
Using Fonts from the Graphics Library Page 3 of 4The following example sets the typeface to Arial, the character height to 14, with proportional spaci
Using Fonts from the Graphics Library Page 4 of 4the typeface. MOVETO then establishes the starting point for each text string. The program sends a me
Using National Language Support Routines Page 1 of 8Using National Language Support RoutinesVisual Fortran provides a complete National Language Suppo
Using National Language Support Routines Page 2 of 8program. They do not change the system default settings. The codepage you select, which can be set
Using National Language Support Routines Page 3 of 8names when writing your applications. Locale Setting and Inquiry RoutinesAt program startup, the c
Using National Language Support Routines Page 4 of 8 strlen = NLSGetLocaleInfo(NLS$LI_SDAYNAME3, str) print *, str ! prints miércoles
Using National Language Support Routines Page 5 of 8Routines discussed in this section are: MBCS Inquiry RoutinesMBCS Conversion RoutinesMBCS Fortran
Using National Language Support Routines Page 6 of 8 PRINT ’(/,1X,’’MBLead = ’’,\)’ DO i = 1, len(str) PRINT ’(L2,\)’,mblead(str(i:i)
Using National Language Support Routines Page 7 of 8NameProcedure TypeDescriptionMBINCHARQQFunction Same as INCHARQQ but can read a single multibyte c
Using National Language Support Routines Page 8 of 8Standard Fortran Routines That Handle MBCS CharactersThis section describes Fortran routines that
Building Programs and Libraries Page 32 of 44to rebuild a project configuration. The automation interfaces defined in DSAPPA.F90 are taken from ...\Mi
Portability Library Page 1 of 9Portability LibraryVisual Fortran includes functions and subroutines that ease porting of code from a different platfor
Portability Library Page 2 of 9Convention) file names. A forward slash in a path name is treated as a backslash. All path names can contain drive spec
Portability Library Page 3 of 9by file name or unit number. Use INQUIRE as an equivalent to FSTAT, LSTAT or STAT. LSTATand STAT return the same inform
Portability Library Page 4 of 9Portability routine DescriptionBESJ0, BESJ1, BESJN, BESY0, BESY1, BESYNComputes the single precision values of Bessel f
Portability Library Page 5 of 9On units with CARRIAGECONTROL=’FORTRAN’ (the default), PUTC and FPUTCcharacters are treated as carriage control charact
Portability Library Page 6 of 9The sample output column of the following table assumes the current date to be 2/24/97 7:11 pm Pacific Daylight Time. T
Portability Library Page 7 of 9less the value of its argument TIME As a subroutine, returns the time formatted as hh:mm:ss As a function, returns the
Portability Library Page 8 of 9Portability routineDescriptionLNBLNK Returns the index of the last non-blank character in a string. QSORT Sorts a one-d
Portability Library Page 9 of 9SYMLNKCreates a symbolic link between two files none Note: CreateProcess is a Win32 API call described in Creating Mult
Files, Devices, and I/O Hardware Page 1 of 17Files, Devices, and I/O HardwareThis chapter discusses Visual Fortran files and devices, and using your i
Building Programs and Libraries Page 33 of 44window. This method is used to show a flicker-free spinning cube. OpenGL (Advanced\Opengl) OpenGL is a pr
Files, Devices, and I/O Hardware Page 2 of 17associated PRINT, which always writes to standard output, unless the FOR_PRINT environment variable is de
Files, Devices, and I/O Hardware Page 3 of 17The following example writes to the preconnected unit 6 (the screen), then reconnects unit 6 to an extern
Files, Devices, and I/O Hardware Page 4 of 17reading from an internal file converts the ASCII representations into numeric, logical, or character repr
Files, Devices, and I/O Hardware Page 5 of 17the beginning of the file. By specifying relative record numbers, you can directly retrieve, add, or dele
Files, Devices, and I/O Hardware Page 6 of 17Data in sequential files must be accessed in order, one record after the other (unless you change your po
Files, Devices, and I/O Hardware Page 7 of 17Variable-lengthThe variable-length record type is generally the most portable record type across multi-ve
Files, Devices, and I/O Hardware Page 8 of 17Variable-Length RecordsVariable-length records can contain any number of bytes, up to a specified maximum
Files, Devices, and I/O Hardware Page 9 of 17record length (2.14 billion bytes), but each segment (physical record) individually cannot exceed the max
Files, Devices, and I/O Hardware Page 10 of 17The layout of stream_CR records appears below. Stream_LF RecordsA stream_LF record is a variable-length
Files, Devices, and I/O Hardware Page 11 of 17 CLOSE (3) ENDFigure: Formatted Sequential FileFormatted Direct Files In a formatted direct fi
Introduction to the Programmer’s Guide Page 2 of 4Using Visual Fortran ToolsNote: Visual Fortran contains many extensions to the full ANSI standard la
Building Programs and Libraries Page 34 of 44whenever the letter"A"is typed, up to a maximum of 32. Each thread bounces a happy face of a di
Files, Devices, and I/O Hardware Page 12 of 17Unformatted Sequential FilesUnformatted sequential files are organized slightly differently on different
Files, Devices, and I/O Hardware Page 13 of 17! -1 is FF FF FF FF hexadecimal.! CHARACTER xyz(3) INTEGER(4) idata(35) DATA
Files, Devices, and I/O Hardware Page 14 of 17Binary Sequential FilesA binary sequential file is a series of values written and read in the same order
Files, Devices, and I/O Hardware Page 15 of 17direct file would cause an error. Valid I/O operations for unformatted direct files produce identical re
Files, Devices, and I/O Hardware Page 16 of 17background applications.) Once you have copied your screen onto the Clipboard, open Paintbrush and selec
Files, Devices, and I/O Hardware Page 17 of 17CONIN$ Standard input 1 If you use one of these names with an extension -- for example, LINE.TXT -- For
Using COM and Automation Objects Page 1 of 12Using COM and Automation ObjectsVisual Fortran provides a wizard to simplify the use of Component Object
Using COM and Automation Objects Page 2 of 124.Write a Fortran 90 program to invoke the code generated by the Visual Fortran module wizard. To underst
Using COM and Automation Objects Page 3 of 12After you select one of the five choices, one of two different screens will appear depending on the selec
Using COM and Automation Objects Page 4 of 12Microsoft recommends that object servers provide a type library. However some applications do not, but do
Building Programs and Libraries Page 35 of 44identical to bootdisk image). This is a console program that is linked against dfwin.lib. generic: The ge
Using COM and Automation Objects Page 5 of 12Choose the type library (or file containing the type library), and optionally specific components of the
Using COM and Automation Objects Page 6 of 12The use of modules allows the Visual Fortran Module Wizard to encapsulate the data structures and procedu
Using COM and Automation Objects Page 7 of 12COMUninitialize Uninitializes the COM library. This must be the last COM routine that you call. DFAUTO Au
Using COM and Automation Objects Page 8 of 12Example of Generated Code Used by the DSLINES SampleThe DLINES Sample contains the code that invokes this
Using COM and Automation Objects Page 9 of 12 The interface of a COM member function looks very similar to the interface for a dynamic link library fu
Using COM and Automation Objects Page 10 of 12 Arguments to a COM or Automation routine can be optional. The wrapper handles the invocation details fo
Using COM and Automation Objects Page 11 of 12 AUTOAllocateInvokeArgs allocates a data structure that is used to collect the arguments that you will p
Using COM and Automation Objects Page 12 of 12Object IdentificationObject identification enables the use of COM objects created by disparate groups of
Programming with Mixed Languages Page 1 of 47Programming with Mixed LanguagesMixed-language programming is the process of building programs in which t
Programming with Mixed Languages Page 2 of 47Mixed-language programming is possible with Visual Fortran, Visual C/C++, Visual Basic, and assembly lan
Building Programs and Libraries Page 36 of 44child windows. menu: The menu sample demonstrates the use of popup menus, user defined menus and menu fuc
Programming with Mixed Languages Page 3 of 47the same version of the visual development environment for your languages (see Mixed-Language Developmen
Programming with Mixed Languages Page 4 of 473.The caller routine and the called routine use a calling convention to select the option of passing a va
Programming with Mixed Languages Page 5 of 47On Alpha systems, there is no leading underscore for external names like MY_SUB, so the correct !DEC$ ATT
Programming with Mixed Languages Page 6 of 47Derived Type [value] Value, size dependentValue, size dependentValue, size dependentValue, size dependent
Programming with Mixed Languages Page 7 of 47No LenLen: Mixed applies when /iface:mixed_str_len_arg is set. The length of the string is pushed (by va
Programming with Mixed Languages Page 8 of 47Visual Basic CDECL keyword C MASM C (in PROTO and PROC declarations) C MASM STDCALL (in PROTO and PROC de
Programming with Mixed Languages Page 9 of 47Alternatively, instead of changing the calling convention of the C code, you can adjust the Fortran sourc
Programming with Mixed Languages Page 10 of 47As an example, the following Fortran and MASM statements set up a MASM function that can be called from
Programming with Mixed Languages Page 11 of 47error. This section discusses:Visual C/C++ and Visual Basic Naming ConventionsMASM Naming ConventionsNam
Programming with Mixed Languages Page 12 of 47For more information on the extern "C" linkage specification, see the Microsoft Visual C++ Lan
Building Programs and Libraries Page 37 of 44values in the Time and Date edit fields, and click the SetInfo button. To set file attributes, set the ap
Programming with Mixed Languages Page 13 of 47extern int __stdcall Sum_Up( int a, int b, int c );Each integer occupies 4 bytes, so the symbol name pla
Programming with Mixed Languages Page 14 of 47STDCALL options change the name to all lowercase. You cannot call a Visual Basic routine from Fortran di
Programming with Mixed Languages Page 15 of 47Compiler options can affect the naming of module data and procedures. Note: Except for ALIAS, ATTRIBUTES
Programming with Mixed Languages Page 16 of 47The routine statement defines either a FUNCTION or a SUBROUTINE, where the choice depends on whether a v
Programming with Mixed Languages Page 17 of 47argument lists just as you can within each language (for example, the argument list a, b and c in CALL M
Programming with Mixed Languages Page 18 of 47In Visual Basic, arguments are passed by reference by default. To pass arguments by value, you use the k
Programming with Mixed Languages Page 19 of 47option value Visual C/C++ Non-arrays Pointer argument_name Default Arrays Default Struct {type} arra
Programming with Mixed Languages Page 20 of 47When the C++ code resides in a .cpp file (created when you select C/C++ file from the visual development
Programming with Mixed Languages Page 21 of 47 USE CPROC CALL PYTHAGORAS (3.0, 4.0, X) TYPE *,X ENDUsing Common External Dat
Programming with Mixed Languages Page 22 of 47.MODEL directive. Conversely, Fortran can declare the variable global (COMMON) and other languages can r
Building Programs and Libraries Page 38 of 44world: The world sample demonstrates scaling and translating an image from a metafile with world coordina
Programming with Mixed Languages Page 23 of 47#pragma pack(2)struct { int N; char INFO[30];} examp;#pragma pack()To restore the origin
Programming with Mixed Languages Page 24 of 47In the following example, the C function initcb receives the address of a common block with the first va
Programming with Mixed Languages Page 25 of 47Fortran data type C data type Visual Basic data type MASM data type INTEGER(1) char--- SBYTEINTEGER(2
Programming with Mixed Languages Page 26 of 47two fields, both of which are 4-byte floating-point numbers; the first contains the real-number componen
Programming with Mixed Languages Page 27 of 47When a Fortran 90 array pointer or array is passed to another language, either its descriptor or its bas
Programming with Mixed Languages Page 28 of 47 END SUBROUTINE Ptr_Sub END INTERFACE REAL A(10), VAR(10) POINTER (p, VAR) ! VAR
Programming with Mixed Languages Page 29 of 47 Iptr_Sub (&a[0]); printf("a[3] = %i\n", a[3]); }On Alpha systems, the alias name for
Programming with Mixed Languages Page 30 of 47the array name. You then access each element relative to the first, skipping the total number of bytes o
Programming with Mixed Languages Page 31 of 47file://D:\TEMP\~hhBA52.htm 9/29/98Language Array declaration Array reference from Fortran Fortran DIME
Programming with Mixed Languages Page 32 of 47The components of the current Visual Fortran array descriptor follow:The first longword (bytes 0 to 3) c
Building Programs and Libraries Page 39 of 44C\AxisScale2D: Uses the CAViewer interface to specify axis scales. C\Fractmtn: A C console application th
Programming with Mixed Languages Page 33 of 47Handling Character StringsBy default, Visual Fortran passes a hidden length argument for strings. The hi
Programming with Mixed Languages Page 34 of 47For string arguments passed by reference with default ATTRIBUTES:When /iface:mixed_str_len_arg is set, t
Programming with Mixed Languages Page 35 of 47This interface handles the hidden-length argument, but you must still reconcile C strings that are null-
Programming with Mixed Languages Page 36 of 47! Fortran CODE TYPE LOTTA_DATA SEQUENCE REAL A INTEGER B CHARACTER(
Programming with Mixed Languages Page 37 of 47reasons, you may prefer to use the C compiler first or get your project settings for both Fortran and C
Programming with Mixed Languages Page 38 of 47Menu Item SelectedCL Option or Project Type EnabledDefault Library Specified in Object FileSingle-thread
Programming with Mixed Languages Page 39 of 47subprograms. The Visual Basic development environment is separate from the Visual Fortran Version 6 deve
Programming with Mixed Languages Page 40 of 47you declared it. Optionally, you can specify a directory path to the Fortran DLL in the declaration. The
Programming with Mixed Languages Page 41 of 47integer size in Basic is 2 bytes, equivalent to INTEGER(2) in Fortran. No extra action is required by ei
Programming with Mixed Languages Page 42 of 47Visual Basic code: Declare Sub FortString1 Lib "forttest" (ByVal S1 as String, ByVal L1 as L
Building Programs and Libraries Page 40 of 44DLL\DLLEXP2: The DLLEXP2 sample demonstrates how COMMON variables defined in a DLL can be shared between
Programming with Mixed Languages Page 43 of 47Debugging the Fortran DLLVisual Basic Error 53: File not found: yy.dllVisual Basic Error 453: Can’t find
Programming with Mixed Languages Page 44 of 47Make sure the Fortran code has specified an ATTRIBUTES ALIAS name that exactly matches the name declared
Programming with Mixed Languages Page 45 of 47 r1 = 456.78 Call FortranCall(r1, Num) Text1.Text = Str$(Num) End Sub6.Select Project..Add M
Programming with Mixed Languages Page 46 of 47...POWER2 ENDPENDIn the example, the Fortran call to MASM is power2(v,e), which is identical to a Fortra
Programming with Mixed Languages Page 47 of 47To return REAL and COMPLEX floating-point values, records, arrays, and values larger than 4 bytes and re
Creating Multithread Applications Page 1 of 14Creating Multithread ApplicationsVisual Fortran provides support for creating multithread applications.
Creating Multithread Applications Page 2 of 14when they should run. Threads of lower priority might need to wait while higher priority threads complet
Creating Multithread Applications Page 3 of 14A module called DFMT.MOD is supplied with Visual Fortran. It contains interface statements to the underl
Creating Multithread Applications Page 4 of 14The second argument, stack, defines the stack size of the new thread. All of an application's defau
Creating Multithread Applications Page 5 of 14Other Thread Support FunctionsScheduling thread priorities is supported through the functions GetThreadP
Building Programs and Libraries Page 41 of 44Mixed-Language (Mixlang)Visual Fortran can be called by a number of other languages, including Visual C/C
Creating Multithread Applications Page 6 of 14Sharing ResourcesEach thread has its own stack and its own copy of the CPU registers. Other resources, s
Creating Multithread Applications Page 7 of 14OpenMutex does not change a mutex object to a signaled state; this is accomplished by one of the wait ro
Creating Multithread Applications Page 8 of 14Variables declared as automatic are placed on the stack, which is part of the thread context saved with
Creating Multithread Applications Page 9 of 14completes. WaitForMultipleObjects is similar, except that its second parameter is an array of Windows ob
Creating Multithread Applications Page 10 of 14for a new process must be loaded. All threads of a process share the same address space and can access
Creating Multithread Applications Page 11 of 14CreateThread Creates a thread to execute within the address space of the calling process. DeleteCritic
Creating Multithread Applications Page 12 of 14ResumeThread Decrements a thread’s suspend count. When the suspend count is zero, execution of the thr
Creating Multithread Applications Page 13 of 14Build menu. Listed following are the steps for compiling and linking your own multithread program using
Creating Multithread Applications Page 14 of 14ramifications of adding multiple threads to the user interface. This article not only offers alternativ
Data Representation Page 1 of 9Data RepresentationDIGITAL Fortran expects numeric data to be in native little endian order, in which the least-signif
Building Programs and Libraries Page 42 of 44set up a Windows application to call the Win32 API directly rather than using QuickWin to build your prog
Data Representation Page 2 of 9DOUBLE PRECISIONT_floating format ranging from 2.2250738585072013D-308 to 1.7976931348623158D308. Values between 2.2250
Data Representation Page 3 of 9The following sections discuss the intrinsic data types in more detail:Integer Data RepresentationsLogical Data Represe
Data Representation Page 4 of 9INTEGER(KIND=2) values range from -32,768 to 32,767 and are stored in 2 contiguous bytes, as shown below:Figure: INTEGE
Data Representation Page 5 of 9On Alpha systems, logical data lengths can be 1-, 2-, 4-, or 8-bytes in length. The default data size used for a LOGICA
Data Representation Page 6 of 9normalization"). This bit is assumed to be 1 unless the exponent is 0. If the exponent equals 0, then the value re
Data Representation Page 7 of 9The form of REAL(KIND=8) data is sign magnitude, with bit 63 the sign bit (0 for positive numbers, 1 for negative numbe
Data Representation Page 8 of 9Character RepresentationA character string is a contiguous sequence of bytes in memory, as shown below.Figure: CHARACTE
Data Representation Page 9 of 9
Handling Run-Time Errors Page 1 of 29Handling Run-Time ErrorsThis section contains information on the following topics: Default Run-Time Error Process
Handling Run-Time Errors Page 2 of 29error. How arithmetic exception conditions are reported and handled depends on the cause of the exception and how
Building Programs and Libraries Page 43 of 44Scientific Graphing Utility (SciGraph)SCIGRAPH is a package of Fortran routines for drawing scientific gr
Handling Run-Time Errors Page 3 of 29This is the message number, also the IOSTAT value for I/O statements.message-textExplains the event that caused t
Handling Run-Time Errors Page 4 of 29Whenever possible, the Visual Fortran RTL does certain error handling, such as generating appropriate messages an
Handling Run-Time Errors Page 5 of 29When using nonadvancing I/O, use the EOR specifier to handle the end-of-record condition. For example: 150 FORMAT
Handling Run-Time Errors Page 6 of 29 CHARACTER(LEN=40) :: FILNM INCLUDE ’iosdef.for’ DO I=1,4 FILNM = ’’ WRITE (6,*) ’Type f
Handling Run-Time Errors Page 7 of 29source listing are usually needed to locate the cause of the error. Certain traceback-related information accompa
Handling Run-Time Errors Page 8 of 29DFORRT.dll 10009324 Unknown Unknown UnknownDFORRT.dll 10009596 Unknown Unkno
Handling Run-Time Errors Page 9 of 291.Choose Settings from the Project menu 2.Click the Fortran tab 3.Select the Listing Files category 4.Click (chec
Handling Run-Time Errors Page 10 of 29FOR_DIAGNOSTIC_LOG_FILE If set to the name of a file, writes diagnostic output to the specified file. The Fortra
Handling Run-Time Errors Page 11 of 29Using the /traceback option to get automatic PC correlation does increase the size of an image. For any applicat
Handling Run-Time Errors Page 12 of 29 Stack trace terminated abnormallyBe forewarned, however, it is also possible for memory to be corrupted in suc
Introduction to the Programmer’s Guide Page 3 of 4statement syntax, unless enclosed in brackets as explained above. In the sentence, "The followi
Building Programs and Libraries Page 44 of 44conditions on intrinsic math calls. It uses the MATHERRQQ subroutine in MATHERR.F90. mbcomp: The mbcomp s
Handling Run-Time Errors Page 13 of 29 end integer*4 function again( ) integer*4 a open(10,file=’xxx.dat’,form=’unformatted’,status=’unknown’) re
Handling Run-Time Errors Page 14 of 29forrtl: severe (24): end-of-file during read, unit 10, file E:\USERS\xxx.datImage PC Routine
Handling Run-Time Errors Page 15 of 29 0001:00000000 _TEOF 00401000 f teof.obj 0001:00000000 _TEOF@0 00401000 f te
Handling Run-Time Errors Page 16 of 29For this simple example, the traceback correlation information added 512 bytes to the image size. In a real appl
Handling Run-Time Errors Page 17 of 29When this program is compiled with /traceback and /optimization:0 on an Alpha system, the traceback output appea
Handling Run-Time Errors Page 18 of 2958011040 0034 muls f0, f1, f058011040 0038 muls f0, f1, f058011040 003C muls f0, f1, AFC1FFFF9 0
Handling Run-Time Errors Page 19 of 29FltF12: 0000000000000000 FltF13: 0000000000000000FltF14: 0000000000000000 FltF15: 0000000000000000
Handling Run-Time Errors Page 20 of 29exception occurred. The following lines describe the call stack. On Alpha, the math library is bundled in as par
Handling Run-Time Errors Page 21 of 29map file for the application, we can see that the reported PC, 00401161, is greater than the start of routine _U
Handling Run-Time Errors Page 22 of 29been called. At the higher optimization level, the compiler has inlined function DOWN1 so that the call to routi
Using the Compiler and Linker from the Command Line Page 1 of 17Using the Compiler and Linker from the Command LineThe DF command is used to compile a
Handling Run-Time Errors Page 23 of 29fpingmain.exe 00401073 DOWN1 11 fping1.forfpingmain.exe 0040104B FPING 5 fpin
Handling Run-Time Errors Page 24 of 29real*4 b [VALUE]!DEC$ IF DEFINED(_X86_)INTERFACE TO SUBROUTINE Unlucky [C,ALIAS:’_Unlucky’] (a,c)!DEC$ ELSEINTER
Handling Run-Time Errors Page 25 of 29a=-10.0b=down1(a)end************************************FPING1.FOR************************************real*4 fun
Handling Run-Time Errors Page 26 of 29!DEC$ ELSEINTERFACE TO SUBROUTINE Unlucky [C,ALIAS:’Unlucky’] (a,c)!DEC$ ENDIFREAL*4 a [VALUE]REAL*4 c [REFERENC
Handling Run-Time Errors Page 27 of 29FOR_ENABLE_VERBOSE_STACK_TRACEIf set to true, displays more detailed call stack information in the event of an e
Handling Run-Time Errors Page 28 of 29unit number does not include an explicit logical unit number. Instead, it uses an implicit internal logical unit
Handling Run-Time Errors Page 29 of 29From within your program, you can set the appropriate environment variable by calling the SETENVQQ routine: pro
The Floating-Point Environment Page 1 of 19The Floating-Point EnvironmentThis section describes the Visual Fortran numeric environment using IEEE® ari
The Floating-Point Environment Page 2 of 19not using floating-point numbers in LOGICAL comparisons or by giving them a tolerance (for example, IF (x &
The Floating-Point Environment Page 3 of 19(0 or 1). The precision P is the number of bits in the nonexponential part of the number (the significand),
Using the Compiler and Linker from the Command Line Page 2 of 17The DF command accepts the following types of options:Compiler options Linker options
The Floating-Point Environment Page 4 of 19BitViewer utility. This tool is accessed from the command line with the command BITVIEW. By default Visual
The Floating-Point Environment Page 5 of 19Note: BitViewer lets you view and manipulate integer and character data as well as floating-point, and to t
The Floating-Point Environment Page 6 of 19Denormalized numbers Denormalized numbers (denormals) fill the gap between the smallest positive number and
The Floating-Point Environment Page 7 of 19representation of xresult: INTEGER(4) FRACTIONFRACTION(x). Returns the fractional part (significand) of the
The Floating-Point Environment Page 8 of 19number and its nearest floating-point representation. The floating-point number representing a rounded real
The Floating-Point Environment Page 9 of 19/nofltconsistency compiler options on x86 systems. Rounding error accumulates in x because the floating-poi
The Floating-Point Environment Page 10 of 19ULPs, Relative Error, and Machine Epsilon /rounding_mode (Alpha only)ULPs, Relative Error, and Machine Eps
The Floating-Point Environment Page 11 of 19name Meaning FPSW Floating-point status word FPCW Floating-point control word SIG Signal FPE Floating-p
The Floating-Point Environment Page 12 of 19FPSW$ZERODIVIDE #0004 A divide by zero occurredFPSW$OVERFLOW #0008 An overflow occurredFPSW$UNDERFLOW
The Floating-Point Environment Page 13 of 19FPCW$DOWN #0400 Round down FPCW$NEAR #0000 Round to nearest FPCW$MCW_EM #003F Exception mask FPCW$IN
Using the Compiler and Linker from the Command Line Page 3 of 17 DF /warn:(argument_checking,declarations) test.f90Instead of the colon, you can use
The Floating-Point Environment Page 14 of 19CALL GETCONTROLFPQQ(control)newcontrol = (control .OR. FPCW$INVALID)! Invalid exception set (disabled).CAL
The Floating-Point Environment Page 15 of 19Handling Run-Time Math Exceptions (x86 only)Handling Floating-Point ExceptionsIf a floating-point exceptio
The Floating-Point Environment Page 16 of 19exception. An example of an exception-handling routine follows. The exception-handling routine hand_fpe an
The Floating-Point Environment Page 17 of 19exceptions result in a standard run-time error (such as forrtl: severe (nnnn): sqrt: domain error). If you
The Floating-Point Environment Page 18 of 19 ENDThe following is a Visual Fortran Sample program (MATHTEST.F90 in the .../DF98/SAMPLES/TUTORIAL folde
The Floating-Point Environment Page 19 of 19for floating-point operations. Refer to your operating system documentation for more information. If the o
Converting Unformatted Numeric Data Page 1 of 8Converting Unformatted Numeric DataThis section describes how you can use DIGITAL Visual Fortran to rea
Converting Unformatted Numeric Data Page 2 of 8Little and Big Endian Storage of an INTEGER ValueMoving unformatted data files between big endian and l
Converting Unformatted Numeric Data Page 3 of 8FDX Little endian integer data of the appropriate size (one, two, four, or on Alpha systems, eight byt
Converting Unformatted Numeric Data Page 4 of 8(such as an array) instead of their respective variables, the fields will not be converted. When they a
Using the Compiler and Linker from the Command Line Page 4 of 17/fast /[no]fixed/[no]fltconsistency (x86 only) /[no]fpconstant/fpe /fpp/[no]fpscomp /[
Converting Unformatted Numeric Data Page 5 of 8Environment Variable FORT_CONVERTn MethodYou can use this method to specify multiple formats in a singl
Converting Unformatted Numeric Data Page 6 of 8This method takes precedence over the OPTIONS statement and the compiler option /convert:keyword method
Converting Unformatted Numeric Data Page 7 of 8Compiler Option /convert Method You can only specify one numeric format for all unformatted file unit n
Converting Unformatted Numeric Data Page 8 of 8default record type (RECORDTYPE) with DIGITAL Fortran depends on the values for the ACCESS and FORM spe
Hexadecimal-Binary-Octal-Decimal Conversions Page 1 of 1+H[DGHFLPDO%LQDU\2FWDO'HFLPDO&RQYHUVLRQV7KHIROORZLQJWDEOHOLVWVKH[DGHFLPDOEL
Using the IMSL Mathematical and Statistical Libraries Page 1 of 6Using the IMSL Mathematical and Statistical LibrariesThe Professional Edition of Visu
Using the IMSL Mathematical and Statistical Libraries Page 2 of 6c.In the drop-down list for Show Directories, select Library files and view the libra
Using the IMSL Mathematical and Statistical Libraries Page 3 of 6For more information about calling the Fortran 90 MP routines, see the IMSL Libraries
Using the IMSL Mathematical and Statistical Libraries Page 4 of 6SF90MPFortran 90 MP library, a new generation of Fortran 90-based algorithms, optimiz
Using the IMSL Mathematical and Statistical Libraries Page 5 of 6 x = amach(0) ! Illegal parameter error CLOSE(9) ENDThe standard output from
Using the Compiler and Linker from the Command Line Page 5 of 17For More Information:On DF command examples, see Examples of the DF Command FormatOn
Using the IMSL Mathematical and Statistical Libraries Page 6 of 6 _exit(0);}This C language example demonstrates the use of: The _stdcall modifier
Compatibility Information Page 1 of 6Compatibility InformationVisual Fortran uses the same DIGITAL Fortran compiler available on DIGITAL UNIX® and Ope
Compatibility Information Page 2 of 6Integer Pointers (Cray pointers) VAX Structures = F90 sequence derived types Mixing logicals and numerics - logic
Compatibility Information Page 3 of 6CRAY pointer support for procedure names (for COM/OLE support) $ATTRIBUTES ALLOCATABLE - allocatable array Mixing
Compatibility Information Page 4 of 6In addition to DIGITAL Visual Fortran systems, DIGITAL Fortran platforms include: DIGITAL Fortran 90 and DIGITAL
Compatibility Information Page 5 of 6LOGICAL*4 REAL*4 REAL*8 COMPLEX*8Support for 64-bit signed integers using INTEGER*8 and LOGICAL*8 (on Alpha platf
Compatibility Information Page 6 of 6found Choosing whether executing code will be thread-reentrant Kind types for all of the hardware-supported data
Using Visual Fortran Tools Page 1 of 69Using Visual Fortran ToolsThis section summarizes the available Visual Fortran tools and describes how to use t
Using Visual Fortran Tools Page 2 of 69Source Browser (BSCMAKE)Creates an information file with details about the symbols in your program. The browse
Using Visual Fortran Tools Page 3 of 69PView (PVIEW) Lets you examine and modify processes and threads running on your system. For more information, s
Using the Compiler and Linker from the Command Line Page 6 of 17 DF myfile.for test.for /out:myprog.exeA correct form of this command is: DF myfile
Using Visual Fortran Tools Page 4 of 69Configure any COM class (including JavaTM-based classes) on your system. This includes Distributed COM activati
Using Visual Fortran Tools Page 5 of 69Setting Up the Command ConsoleFortran Compiler and LinkerMS-DOS EditorBuilding Projects with NMAKEResource Comp
Using Visual Fortran Tools Page 6 of 69The size of the command console text buffer and the position of the command console window if it is presented i
Using Visual Fortran Tools Page 7 of 69having the same names as those needed by Visual Fortran. As described in Using the Command-Line Interface in G
Using Visual Fortran Tools Page 8 of 69Inline Files in a Makefile Macros and NMAKENMAKE Inference Rules Dot Directives Makefile Preprocessing Running
Using Visual Fortran Tools Page 9 of 69(resolution of two seconds or less). /C Suppresses default output, including nonfatal NMAKE errors or warnings
Using Visual Fortran Tools Page 10 of 69/T Updates timestamps of command-line targets (or first makefile target) and executes preprocessing commands
Using Visual Fortran Tools Page 11 of 69Macros Inference Rules Dot Directives Preprocessing Directives Other features of a makefile include wildcards,
Using Visual Fortran Tools Page 12 of 69In macros, a backslash followed by a newline character is replaced by a space. In commands, a percent symbol (
Using Visual Fortran Tools Page 13 of 69A pseudotarget used as a dependent must also appear as a target in another dependency; however, that dependenc
Using the Compiler and Linker from the Command Line Page 7 of 17A browser file (.SBR) if you specify the /browser option You control the production of
Using Visual Fortran Tools Page 14 of 69 echo Buildingclimb.exe...leap.exe : jump.obj# invokes an inference ruleTargets in Multiple Description Bloc
Using Visual Fortran Tools Page 15 of 69any valid filename or pseudotarget. Separate multiple dependents with one or more spaces or tabs. Dependents a
Using Visual Fortran Tools Page 16 of 69Command Modifiers in NMAKEYou can specify one or more command modifiers preceding a command, optionally separa
Using Visual Fortran Tools Page 17 of 69An inline file contains text you specify in the makefile. Its name can be used in commands as input (for examp
Using Visual Fortran Tools Page 18 of 69Reusing Inline Files in MakefilesTo reuse an inline file, specify <<filename where the file is defined a
Using Visual Fortran Tools Page 19 of 69only spaces or tabs. The string can contain a macro invocation. Special Characters in NMAKE MacrosA number sig
Using Visual Fortran Tools Page 20 of 69Using an NMAKE MacroTo use a macro, enclose its name in parentheses preceded by a dollar sign ($): $(
Using Visual Fortran Tools Page 21 of 69Macro Meaning $@Current target’s full name (path, base name, extension), as currently specified. $$@Current t
Using Visual Fortran Tools Page 22 of 69undefined. Microsoft product Command macro Defined as Options macro Macro Assembler AS ml AFLAGS Basic Co
Using Visual Fortran Tools Page 23 of 69extension, NMAKE uses a rule whose extensions match the target and an existing file in the current or specifie
Using the Compiler and Linker from the Command Line Page 8 of 17/list:file .LST /map:file .MAP /pdbfile:file .PDB (default filename is df60.pdb)Tempor
Using Visual Fortran Tools Page 24 of 69Batch-Mode RulesBatch-mode inference rules provide only one invocation of the inference rule when N commands g
Using Visual Fortran Tools Page 25 of 69.cbl.exe $(COBOL) $(COBFLAGS) $*.cbl, $*.exe; cobol $*.cbl, $*.exe; .cbl.obj $(COBOL) $(COBFLAGS) $*.cbl; co
Using Visual Fortran Tools Page 26 of 69sensitive and are uppercase. Directive Action .IGNORE :Ignores nonzero exit codes returned by commands, from
Using Visual Fortran Tools Page 27 of 69Expressions in Makefile Preprocessing Makefile Preprocessing Operators Executing a Program in Preprocessing Ma
Using Visual Fortran Tools Page 28 of 69defined. A null macro is considered to be defined. !IFNDEF macronameProcesses statements between !IFNDEF and t
Using Visual Fortran Tools Page 29 of 69equivalent to !IFDEF or !ELSE IFDEF. However, unlike these directives, DEFINED can be used in complex expressi
Using Visual Fortran Tools Page 30 of 69The Microsoft visual development environment includes a special dialog editor for creating dialogs and placing
Using Visual Fortran Tools Page 31 of 69After creating individual resource files for your application’s dialog box and icon resources, you create a re
Using Visual Fortran Tools Page 32 of 69The menu definition, enclosed by the BEGIN and END keywords, specifies each menu item and the menu identifier
Using Visual Fortran Tools Page 33 of 69/x Prevents RC from checking the INCLUDE environment variable when searching for header files or resource fil
Using the Compiler and Linker from the Command Line Page 9 of 17and files. The options and files specified by the DF environment variable are added to
Using Visual Fortran Tools Page 34 of 69Delete a member from a library Use the /REMOVE option. LIB processes any specifications of /REMOVE after combi
Using Visual Fortran Tools Page 35 of 69LIB Output FilesThe output files produced by LIB depend on the usage mode as follows: Mode Output Default (bu
Using Visual Fortran Tools Page 36 of 69To run LIB, type the command LIB followed by the options and filenames for the task you are using LIB to perfo
Using Visual Fortran Tools Page 37 of 69Suppresses display of the LIB copyright message and version number and prevents echoing of command files. /VER
Using Visual Fortran Tools Page 38 of 69Other LIB options are described in:Building an Import Library and Export FileExtracting a Library MemberUsing
Using Visual Fortran Tools Page 39 of 69You can use LIB to create an object (.OBJ) file that contains a copy of a member of an existing library. To ex
Using Visual Fortran Tools Page 40 of 69The following options apply to building an import library and export file: /DEBUGTYPE:{CV|COFF|BOTH} This opti
Using Visual Fortran Tools Page 41 of 69exports to ONE.DLL, the import library for TWO.DLL won’t exist yet when ONE.DLL is linked. When circular expor
Using Visual Fortran Tools Page 42 of 69Specify one or more files for the objects or images to be changed, and one or more options for changing the fi
Using Visual Fortran Tools Page 43 of 69If a program has been modified with the /BIND option, and if the base addresses for the executable file and it
Introduction to the Programmer’s Guide Page 4 of 4Fortran. Platform LabelsA platform is a combination of operating system and central processing unit
Using the Compiler and Linker from the Command Line Page 10 of 17For an introduction to Visual Fortran project types, see Types of Projects. Redirecti
Using Visual Fortran Tools Page 44 of 69BASEFILE Creates a file named COFFBASE.TXT, which is a text file in the format expected by LINK’s /BASE optio
Using Visual Fortran Tools Page 45 of 69s sharedu uninitialized dataw writeTo control alignment, specify the character "a" followed by a cha
Using Visual Fortran Tools Page 46 of 69Options. EDITBIN Option /SWAPRUNThis option edits the image to tell the operating system to copy the image to
Using Visual Fortran Tools Page 47 of 69There are times when you must examine or change OBJ, EXE, and DLL files. In the visual development environment
Using Visual Fortran Tools Page 48 of 69Option Description/ALL Displays all available information except code disassembly. Use the /DISASM option to
Using Visual Fortran Tools Page 49 of 69Argument Result BYTES The default. Contents are displayed in hexadecimal bytes, and also as ASCII if they hav
Using Visual Fortran Tools Page 50 of 69Format Editor writes the updated format statement and generates new continuation marks. Similarly, the part of
Using Visual Fortran Tools Page 51 of 695.A default value is used for the descriptor you choose (for example, I5). To change the descriptor value, sel
Using Visual Fortran Tools Page 52 of 69profiling, you must write batch files to invoke PREP, PROFILE, and PLIST. You can redirect the output of the b
Using Visual Fortran Tools Page 53 of 69If the preceding batch file was named FTIME.BAT, and you wanted to profile the program TEST from the command p
Using the Compiler and Linker from the Command Line Page 11 of 17By default, when you use the DF command, your source files are compiled and then link
Using Visual Fortran Tools Page 54 of 69 /OM /FT /EXC nafxcwd.lib # this is a commentThe # character in a response file defines a comment that runs t
Using Visual Fortran Tools Page 55 of 69 optionsControl the kind of profiling, the inclusion and exclusion of code to be profiled, whether to merge pr
Using Visual Fortran Tools Page 56 of 69/IT filenameX Merges an existing .PBT file (the file generated by the second call to PREP to be passed to PLI
Using Visual Fortran Tools Page 57 of 69In this example, the /EXCALL option excludes all modules from the profile, and the /INC option supercedes that
Using Visual Fortran Tools Page 58 of 69Option Description /A Appends any redirected error messages to an existing file. If the /E command-line opti
Using Visual Fortran Tools Page 59 of 69PLIST [options] inputfilePLIST reads the command line from left to right, so the rightmost options override co
Using Visual Fortran Tools Page 60 of 69/SLS Forces line count profile output to be printed in coverage format./SN Sorts output in alphabetical orde
Using Visual Fortran Tools Page 61 of 69Generating the Tab-Delimite ReportUsing the PROFILER.XLM MacroChanging the PROFILER.XLM Selection CriteriaThe
Using Visual Fortran Tools Page 62 of 69Tab-delimited reports are generated with global information records first, organized in numerical order by for
Using Visual Fortran Tools Page 63 of 69521 Profile: Function counting, sorted by function name 522 Profile: Function timing, sorted by function nam
Using the Compiler and Linker from the Command Line Page 12 of 17 DF myprog.for /show:mapIf the options specified on the command line conflict with t
Using Visual Fortran Tools Page 64 of 69Date The date/time the profile was run (ASCII format) Command Line The PLIST command-line arguments Profiling
Using Visual Fortran Tools Page 65 of 697 Format tag number Exe ASCII name of the executable file that contains this function Source ASCII name of t
Using Visual Fortran Tools Page 66 of 69Function name Each functions name on the stack. The number of names that appear here will be equal to the stac
Using Visual Fortran Tools Page 67 of 691.Open PROFILER.XLM by choosing Open from the File menu. 2.Open the tab-delimited report that was created by P
Using Visual Fortran Tools Page 68 of 69The command options are: -e:nameProcesses only the program unit name. You can specify more than one -e name on
Using Visual Fortran Tools Page 69 of 69formatted according to line printer conventions. The FPR command has the following form: FPR [-f record-size]
Using the Compiler and Linker from the Command Line Page 13 of 17file, a separate listing file is generated for each object file created. The content
Using the Compiler and Linker from the Command Line Page 14 of 17The following command links against single-threaded DLLs. It links against the defaul
Using the Compiler and Linker from the Command Line Page 15 of 17Compiling and Linking for OptimizationIf you omit both the /compile_only and the /ke
Using the Compiler and Linker from the Command Line Page 16 of 17For more information about compiling and linking Visual Fortran and Visual C++® progr
Using the Compiler and Linker from the Command Line Page 17 of 17Diagnostic messages usually provide enough information for you to determine the cause
Compiler and Linker Options Page 1 of 111Compiler and Linker OptionsMost of the compiler and linker options can be specified within the Microsoft visu
Compiler and Linker Options Page 2 of 111Figure: Project Settings, Fortran TabThe options are grouped under functional categories (the initial Categor
Building Programs and Libraries Page 1 of 44Building Programs and LibrariesVisual Fortran includes the Microsoft visual development environment (also
Compiler and Linker Options Page 3 of 111If a compiler option is not available in the dialog boxes, you can enter the option in the lower part of the
Compiler and Linker Options Page 4 of 111Microsoft Fortran PowerStation: Libraries /fpscomp:[no]libs Microsoft Fortran PowerStation: Logical Values /f
Compiler and Linker Options Page 5 of 111External Procedures (and Argument Passing) Options Argument Passing Conventions /[no]iface:keywordExternal Na
Compiler and Linker Options Page 6 of 111Fortran Language Options Enable FORTRAN 66 Semantics /[no]f66 Enable Alternate PARAMETER Syntax /[no]altpar
Compiler and Linker Options Page 7 of 111Software Instruction Scheduling /[no]pipeline (Alpha only; command line only) Display Help Text File /help
Compiler and Linker Options Page 8 of 111Math Library: Checking or Fast Performance /math_library Inlining Procedures /[no]inlineCode Tuning for x86
Compiler and Linker Options Page 9 of 111/alignment[:keyword...], /noalignment, or /ZpnThe /alignment option specifies the alignment of data items in
Compiler and Linker Options Page 10 of 111/Zp4 /align:rec4byte /alignment/Zp8 with /align:dcommons, /alignment:all, or /alignment:(dcommons,records)/n
Compiler and Linker Options Page 11 of 111The /architecture (/arch) option controls the types of processor-specific instructions generated for this pr
Compiler and Linker Options Page 12 of 111/arch:host Generates code for the processor generation in use on the system being used for compilation. Depe
Building Programs and Libraries Page 2 of 44project but still maintain a consistent source code base from which to work. When you create a new project
Compiler and Linker Options Page 13 of 111/asmattributes:keyword, /noasmattributes, /FA, /FAs, /FAc, or /FAcsThe /asmattributes option indicates what
Compiler and Linker Options Page 14 of 111/FAs[file] provides interspersed source code as comments in the assembly listing file. /FAc[file] provides a
Compiler and Linker Options Page 15 of 111For more information on /assume:noaccuracy_sensitive, see Arithmetic Reordering Optimizations./assume:[no]bu
Compiler and Linker Options Page 16 of 111In the visual development environment, specify Enable Dummy Argument Aliasing in the Fortran Data (or Optimi
Compiler and Linker Options Page 17 of 111In the visual development environment, specify Append Underscore to External Names in the External Procedure
Compiler and Linker Options Page 18 of 111Syntax:/browser[:filename], /nobrowser, or /FRThe /browser or /FR option controls the generation of source b
Compiler and Linker Options Page 19 of 111/check:bounds(Array and String bounds) /check:flawed_pentium (x86 systems)(Flawed Pentium)/check:format(Edit
Compiler and Linker Options Page 20 of 111/check:format Requests a run-time error message when the data type for an item being formatted for output do
Compiler and Linker Options Page 21 of 111Equivalent to:/check:(bounds,flawed_pentium,format,power,output_conversion,overflow,underflow). /[no]comment
Compiler and Linker Options Page 22 of 111Compatibility Compiler Option Category. The /convert options are:/convert:big_endian /convert:cray /convert:
Building Programs and Libraries Page 3 of 44Notes in the diagram point to places where you can read more about a particular part of the development pr
Compiler and Linker Options Page 23 of 111Integer data is in native little endian format. REAL(KIND=4) and COMPLEX(KIND=4) (SINGLE PRECISION) data is
Compiler and Linker Options Page 24 of 111/libs:keyword and /[no]threads options, and is one of: libcd.lib, libcmtd.lib, or msvcrtd.lib (see Visual Fo
Compiler and Linker Options Page 25 of 111smaller than if you specified /debug:full. /debug:full, /debug, /Zi, or /Z7 If you specify /debug:full, /deb
Compiler and Linker Options Page 26 of 111Predefined Preprocessor Symbols_DF_VERSION_= 600 (600 for Version 6.0; compiler only) _WIN32=1 (always defin
Compiler and Linker Options Page 27 of 111Syntax:/error_limit[:count] or /noerror_limitThe /error_limit option specifies the maximum number of error-l
Compiler and Linker Options Page 28 of 111/extfor:extThe /extfor: option specifies file extensions to be processed (/extfor) by the DIGITAL Fortran co
Compiler and Linker Options Page 29 of 111Syntax:/f77rtl or /nof77rtlThe /f77rtl option controls the run-time support that is used when a program is e
Compiler and Linker Options Page 30 of 111Files with an extension of .f90 or .F90 are assumed to be free-format source files. Files with an extension
Compiler and Linker Options Page 31 of 111/fpeSyntax:/fpe:levelThe /fpe:level option controls floating-point exception handling at run time for the ma
Compiler and Linker Options Page 32 of 111only) displayed only if /check:underflow is also specified. Use of a denormalized (or exceptional) number in
Kommentare zu diesen Handbüchern