Programs for Programmers

LF Fortran - VS2005/VS2008 Integration

Lahey Computer Systems, Inc.Fujitsu Ltd.


The LF Fortran - VS2005/VS2008 Integration provides integration for Lahey Fortran 95 v5.7/v7.1 Win32 compiler with VS2005 or VS2008.

It is encorporated in LF V7.2 and is therefore not necessary for users who have the latest release.

This product enhancement includes:


  • Project system
  • Win32 project and project item templates
  • On-line integrated help
  • Syntax coloring
  • Expandable code
  • Method tips for intrinsic functions
  • Quick info for local and global variables
  • Block commenting and indenting
  • Brace matching
  • Automation support
  • MSBuild support
  • System Requirements



  • LF Fortran v5.7/v7.1 Express*/v7.1
  • Visual Studio 2005 or 2008
  • Win2000 SP4, Windows XP or Vista



    Project system

    The project is a basic building block that Visual Studio uses to create applications. A project will normally take a set of one or more source files and produce a compiled executable, but a project can also produce things like DLLs or static libraries, or do other sorts of processing. All the source files within a project are usually written in one programming language, and are compiled with one compiler. The LF95 integration package provides several type of projects, and allows users of VS2003 to automatically upgrade their native Fortran projects to VS2005 or VS2008. The LF95 project facility automatically scans all source files at build time and ensures all files are built in the proper order to satisfy module dependencies.

    Win32 project and project item templates

    LF95-VS2005 New Item Console project

    On-line integrated help

    The VS2005/VS2008 integration package provides documentation that is integrated into Visual Studio help system. The comprehensive documentation covers the Fortran language, LF95 compiler usage, and Fortran-smart Visual Studio editing features:

    LF95-VS2005 Help Contents

    Syntax coloring

    Syntax coloring provides the ability to differentiate code elements based on color. For example, a keyword may appear in blue, comments may appear in green, while character strings might be maroon. The Fortran language allows variables and procedures to have the same names as keywords, and this can pose a problem for colorizers that do not have a strong parsing ability. Since the parser used in the Lahey colorizer is derived from a Fortran compiler, it is unlikely that is would be confused by an identifier with the same name as a keyword. The integration package allows the user to customize the colorizing scheme.

    Expandable code

    Expandable code can make the chore of navigating through sections of code easier by allowing you to collapse a region of code into a single line. This feature works at the module and procedure levels by default, but the user has the ability to add new outlining regions, or to remove existing outlining regions.

    LF95-VS2005 Block expansion

    A portion of the collapsed code can be viewed by hovering the mouse over the box containing the "...":

    LF95-VS2005 Block collapsed

    Method tips for intrinsic functions

    Parameter Info is a feature that helps the user write code by displaying information about intrinsic procedures as the user is typing. Parameter Info is currently implemented for all Fortran 95 intrinsic procedures, and Lahey extensions supported by LF95.
    As a procedure invocation is typed, the open parenthesis character triggers the Parameter Info tooltip for the first argument:

    LF95-VS2005 Method tooltips

    As typing continues, each succeeding comma character that is typed will trigger a tooltip for the next parameter:

    LF95-VS2005 Method parameter tooltip

    When a close parenthesis character is typed, the tooltip window is dismissed. The tooltip window is also dismissed whenever the cursor is moved outside of the area of the argument list.

    Quick info for local and global variables

    Quick Info provides the user with information about variables and intrinsic procedures by displaying an informational tooltip window when the mouse is hovered over a name. Quick Info is currently implemented for all Fortran 95 intrinsic procedures, Lahey extensions supported by LF95, and variables that are defined within the same file.

    LF95-VS2005 method parameter info
    LF95-VS2005 variable info
    LF95-VS2005 Module variable info

    Block commenting and indenting

    Block commenting is a feature that allows the user to quickly comment or uncomment selected blocks of code. Block indenting allows the user to change the indentation of a selected block of code. Both of these features work for code that is highlighted. If any portion of a line is highlighted, the feature works on the entire line. If there is no highlighted code, commenting or indenting will work on the single line where the cursor resides.

    Brace matching

    Parenthesis matching is a feature that locates a matching parenthesis and highlights the parenthesis pair. This feature can be quite useful when examining a complex statement. The following diagram shows a single multiline code statement with the matching braces highlighted with a light gray box:

    LF95-VS2005 Brace matching

    Automation support

    Automation is the ability to control Visual Studio, solutions and projects with software. It allows the user to programmatically control project creation and modification, to set project and file compilation options, and to build and execute projects.

    MSBuild support

    MSBuild is Microsoft's XML-based build system. It is integrated with Visual Studio, but it can also be used on the command line. The LF95 Project facility uses MSbuild when building projects. For a comprehensive description of MSBuild, see the MSDN documentation for msbuild.exe.

    *  Certain features are unavailable if used with LF v7.1 Express, such as Debugging and WiSK