Lahey Fortran

Quick Start

If you are new to Lahey Fortran, follow the steps below to get going fast and easily. This is just to "get your feet wet" with the basics of building an application. Once you have completed these steps, go to the other Getting Started topics to delve deeper into the product features.

Quick Start with Visual Studio

These steps assume that Visual Studio 2012 or 2010 was installed before Lahey/Fujitsu Fortran was installed with the default features.

  1. Start Visual Studio by selecting Microsoft Visual Studio <version> (LF Fortran) from Windows Start.

  2. Create a new VS Project by selecting File > New > Project...

  3. Create a Console Application template by selecting Lahey Fortran in the left pane and Console Application in the center pane. Press OK.
    You will see the Fortran source code for Program.f95 in the editor window - it is a program skeleton that does nothing.

  4. Build and run the program by selecting Debug > Start Without Debugging.

  5. You will see the program run in a console window, automatically pausing so you can see the output. Press Enter to exit the console.

Note: After initial installation, Lahey/Fujitsu Fortran 95 (LF95) will be the default build compiler. For information on changing the current compiler, as well as how set build options, see Setting Build Options.

Quick Start with the Console Prompt

These steps assume that Lahey/Fujitsu Fortran was installed with the "Copy examples to My Documents" option.

  1. Open a console by selecting LF Fortran Console Prompt from Windows Start.

  2. To change to the Examples subdirectory, type: CD examples <Enter>

  3. To build the Demo program with Lahey/Fujitsu Fortran, type: LF95 demo.f90 <Enter>.
    Or, to to build the Demo program with Lahey/GNU Fotran, type: LGF demo.f90 <Enter>

  4. To run the Demo program, type: demo.exe <Enter>

  5. Follow the prompts of the Demo program.

See Also

Getting Started
Getting Started with Visual Studio Fortran
    Building And Running Your First Lahey Fortran Project
    How To: Migrate Existing Code Into Visual Studio
Developing with Visual Studio
Command Line Development