Getting Started for Visual Fortran
- Concepts
- Visual Fortran includes Fortran77ĦBFortran90 and IMSL Libraries
- Programming Hierarchy : Workspace -> Project -> File
A Workspace can contain multiple projects.
A Project consists of multiple Files.
A File refers to main program or other related subprogram (e.g. subroutineĦBfunctionĦBmodule and etc.)
- Workspace : file name with extension dsw
Project : file name with extension dsp
File : file name with extension f90
- Work in just one workspcae at a time
- Executing by double clicking [Developer Studio]
- Open a New Workspace
- In the [File] menu, click [New]
- In the [New] menu, click [Workspace] then input [Workspace Name]ĦB [Location], at last click [OK]
- Add a New Project to Current Workspace
- In the [File] menu, click [New]
- In the [New] menu, click [Project] then click [Win32 Console Application], [Add to Current Workspace] and input [Project Name]ĦB [Location], at last click [OK]
- Add a New File to a Project
- In the item of [Project] menu, click [Add to Project] then click [New]
- In the [New] menu, click [Fortran Free Format Source File] ( or [Fortran Fixed Format Source File] )ĦB [Add to Project] and input [File Name]ĦB [Location], at last click [OK]
- Start programming
- Input / Output File : In the [New] menu, click [ Text File] ĦB [Add to Project] and input [File Name]ĦB [Location], at last click [OK]
- Compile and Execute
- In the [Build] menu, click [Compile XXX]ĦB [Build XXX.exe], the compiled and linking messages will be shown in the output window below
- In the [Build] menu, click [Execute XXX.exe]
- Setting for linking IMSL Libraries
- In the [Project] menu, click [Setting]ĦB [Link]ĦA and append "sstatd.lib sstats.lib smaths.lib smathd.lib sf90mp.lib" in the [Object/Library Modules] of [General] [Category]. Separate file names with space. ( Restricted to versions 5.0 )
- In the [Project] menu, click [Setting]ĦB [Link]ĦA and append "imsl.lib imsls_err.lib imslmpistub.lib" in the [Object/Library Modules] of [General] [Category]. Separate file names with space. ( Restricted to versions 6.1 & 6.5)
- Setting for linking NAG Libraries ( Restricted to versions higher than 6.0. Another CDROM is required to install NAG libray. Please contact the computer room. )
- Single Precision: Click here to check the appropriate NAG sublibrary file names corresponding to required NAG subroutines.
- In the [Project] menu, click [Setting]ĦB [Link]ĦA and append each required sublibrary in full path ( e.q. "c:\fldll194z\dll\nagXXX.lib " ) in the [Object/Library Modules] of [General] [Category]. Separate file names with space.
- Double Precision: In the [Project] menu, click [Setting]ĦB [Link]ĦA and append "c:\flw3219dd\naglib.lib " in the [Object/Library Modules] of [General] [Category]. Separate file names with space.
- Open an Existing Workspace
- In the [File] menu, click [Open Workspace] or [Recent Workspaces]
- Adding an Existing File to Project
- In the [Project] menu, click [Add to Project] then click [Files]