Configuration Component


This configuration component contains highlighting, active strings, dictionary, menus, keyword search, buttons and images, tool bar customizations, compilation support and many more for Fortran 90 computer language and its later standards, including the current Fortran 2003 standard.


The contents of the zip archive should be extracted in the following directory: %b\Config\Fortran90.

Note that %b is different from %B. While %B always means the WinEdt installation directory, i.e.,

  • for x86 platform: C:\Program Files\WinEdt Team\WinEdt
  • for x64 platform: C:\Program Files (x86)\WinEdt Team\WinEdt

%b means:

on Windows 95/98/Me:
%b is equal to %B, usually it is
C:\Program Files\WinEdt Team\WinEdt
on 32-bit Windows NT/2000/XP/2003 working as Administrator (or single user mode):
%b is equal to %B, usually it is
C:\Program Files\WinEdt Team\WinEdt
on 64-bit Windows XP/2003/Vista/Win7 working as Administrator (or single user mode):
%b is equal to %B, usually it is
C:\Program Files (x86)\WinEdt Team\WinEdt
on 32 or 64-bit Windows XP/2003/Vista/Win7 working as an ordinary user:
%b is equal to %appdata%\WinEdt, usually it is
C:\Documents and Settings\<username>\Application Data\WinEdt
or, for Windows Vista and Windows 7

After extraction you have to open WinEdt to execute the installation macro via Macros | Execute Macro... | _install_Fortran90.edt command.

What does it contain?

After installation a new item, named Fortran90 Editor, is added to the Options | Configurations menu. It does the following: Loads all menus and toolbar customizations related to Fortran90 mode.

Static Highlighting

You can see the custom Fortran90 highlighting in action by answering "Yes" at the end of installation regarding the sample file or you can later open sample.f90 file by hand. Highlighting includes:

Highlighted switches:

  • Fortran90 Comment: !
  • Fortran90 Strings: ' or "
  • Fortran90 Intent: intent(?)
  • Fortran90 Module, Function, and Subroutine names
  • Fortran90 Numbers

Highlighted keywords:

  • Fortran90 Keywords
  • Fortran90 Data Types
  • Fortran90 Intrinsics
  • Fortran90 Logicals
  • Fortran90 Specifiers

Dynamic Highlighting and Command Completion

Dynamic highlighting and (dynamic) command completion is supported via the dynamicKeywords macro. It allows highlighting and command completion of user defined Fortran90 functions, subroutines, interfaces, and (some) variables gathered from WinEdt's Tree. Therefore, to use this feature you need to have dynamicKeywords files installed at %b\Macros\macro and, additionally, you have to set a Fortran90 Main file and then build a Tree.

Dynamic highlighting and command completion can be triggered either manually, by choosing Tools | Update Dynamic Keywords, or automatically by using the related active strings, like "function<space>" or "subroutine<space>", for example.

Active Strings

Trigger Inserts

program<space>program statement
module<space>module statement
forall<space>forall construct
fall<space>forall statement
dowhile<space>do while (optimized form)
do<space>do construct
ndo<space>named do construct
case<space>case construct
if<space>if statement
ifthen<space>if ... then ... end if
ifelse<space>if ... then ... else ... end if
where<space>where statement
welse<space>where construct with elsewhere
subroutine<space>subroutine statement
function<space>function statement
typefunc<space>function with inline type declaration
recursive<space>recursive function
recfunc<space>recursive function with inline type declaration
open<space>open file statement
mproc<space>expands to: module procedure
call ?jumps to corresponding function, subroutine or interface definition on double-click
procedure ?jumps to corresponding function or subroutine definition (if module procedure) on double-click

Document Menu 

New Document templates:

Fortran Document Creates an empty .f90 file with a header and some custom stamps already included as fortran comments
Fortran Program Creates a new .f90 file with a header, some custom stamps, and a program statement.
Fortran Module Creates a new .f90 file with a header, some custom stamps, and a module statement.

Insert Menu

Some Fortran90 Statements and Constructs:

Program StartInserts a Fortran program statement with some user comments. Very useful to begin new programs from scratch.
Module StartInserts a Fortran module statement with some user comments. Very useful to begin new modules from scratch.
FunctionInserts a Fortran function statement.
Recursive FunctionInserts a Fortran recursive function statement.
SubroutineInserts a Fortran function statement.
ConstructsInserts some Fortran constructs: case, do, forall, if, etc...
StatementsInserts some Fortran statements: forall, if, open

Tools Menu

If it doesn't already exist, a new menu item called Update Dynamic Keywords will be added to the Tools Menu.

Update Dynamic KeywordsThis command updates syntax highlighting and code completion of user-defined variables, functions and procedures.
This commands is not only useful to the Fortran90 mode, but for all other modes that use the Dynamic Keywords macro, so it will not be removed when uninstalling Fotran90 mode (not a bug).

Accessories Menu

Compile File (Ctrl+F8) Compile your current Fortran file. If this file has dependencies, like modules or includes, you need to set it as Main File and then Build a Tree. Before compiling, you must select and configure your preferred Fortran compiler, this can be done in the Compiler Settings dialog.
Build & Run (F9) Compile (if required), link into executable, and run (if build succeeded) the resulting executable file. Note that if you have previously set a Main File then this command compiles every (dependent) file in a project, tracking whether the compiled version of each file are already up to date in order to save time, and then it uses the linker to put it all together in an executable and then execute your project.
Run (F8) Launch the executable.
Clean Open Erase dialog window. Allows you to selectively delete output files.
Compiler Settings Select your preferred compiler and change compiler settings. You can also set linker options. All settings are tied to the current fortran file or project. The information you entered here is saved in a configuration file (.mak) for future reference. The current supported compilers are:
  • Intel Visual Fortran Compiler (32-bit and 64-bit versions)
  • g95 Fortran Compiler (MinGW version only)
  • gfortran Compiler (MinGW version only)
Add New Compiler Allows you to add a not detected compiler manually by locating the compiler executable file (g95.exe, gfortran.exe, ifort.exe ...). In this way you can even use a Fortran compiler that is not actually installed, but is contained, for example, in your portable device.

Help Menu

If you have downloaded the version of this component that comes with the Intel Visual Fortran Language Reference, then the Keyword Search command, or Ctrl+F1 shortcut, can be used to search for Fortran keywords and intrinsic procedures. If your download does not contain the help file (lref_for.chm), you can try downloading it from one of the links below and thereafter copy the help file to %b\Config\Fortran90 directory:

Fortran90 Dictionary

The Fortran90 Dictionary has most Fortran keywords and intrinsic procedures, it can be used for Command Completion by using the Ctrl+Enter shortcut.

Time and file stamps

If this option was selected in the installation procedure, a new macro replaces the original MDI Save Event macro. The purpose of this new macro is to automatically update custom time and file stamps while in Fortran90 mode. Time and file stamps are inserted as Fortran comments, begins with a dollar sign and ends with a colon (:). For example:

! $file: filename.f90
! $date: August 28, 2009

New features

  • New Document templates for Fortran90 Mode, accessible from Document | New Document... menu.
  • New item in Accessories menu: Add New Compiler...
  • Improved (more consistent) detection of Windows edition, 32-bit or 64-bit, meaning better detection for all supported fortran compilers.
  • New versions (> 11.0) of Intel Fortran Compiler (ifort) are now automatically detected/supported (I hope).
  • Improved error parsing for new versions of ifort/g95/gfortran compilers. Now selecting, when applicable, the problematic string.
  • Better detection of gfortran compiler.
  • New auto-parallelization option in compiler settings window.
  • Better syntax highlighting for numbers and variables containing numbers.
  • Improved detection of all supported compilers.

Known Bugs & Limitations

  • This Configuration Component recognizes only the .f90 extension for Fortran source code, with the exception for included files. If your included files reside in the same directory of your source files, then you must assign included files a distinct extension (for example, .inc) in order to avoid unwanted compilation of included files.
  • If you don't like to use a different file extension for includes, then you have to put those included files in a distinct directory in order to still use the default .f90 extension. Note also that it is necessary to inform the location of this specific folder in the third tab (Paths) of the Compiler Settings dialog window. Please use only relative (to source) paths and forward slash (Unix-like) in this dialog.
  • Although it is possible to put module files together with included files, in a specific folder apart from normal source code, this is not supported by this component. Please put your modules along with your ordinary source code.
  • If a module filename is different from the module name it contains then the Clean procedure will not delete the corresponding generated .mod file.
  • If a file containing only a function (for example) is required by your project but it's not INCLUDEd or USEd then this file will not be shown inside WinEdt's Tree. But you can still build your project.
  • All .f90 files in the source folder are compiled. So do not leave unrelated Fortran files in your project's source folder. Keep every project in its own folder (directory).
  • There is no syntax highlighting or other features for Fortran 77, this configuration mode is intended for Fortran 90 standard or later.

Download [157 KB, without Intel Visual Fortran Language Reference] [1961 KB, including Intel Visual Fortran Language Reference]

The package requires the

which both must be saved in %b\Macros\macro (preferably) or %B\Macros\macro.

Configuration component contributed by Bernhard Enders <>

  Configuration Component