Home

Languages and Syntax Highlighting

Simply Fortran’s editor uses syntax highlighting and other language-specific features to aid in editing source code. Normally when a file is loaded, the file extension is used to determine the type of file loaded. Based on the file type, source code can be highlighted to help keywords, comments, and variables to stand out in the editor as well as supporting the expansion and contraction of structures within the code.

Supported Languages

Simply Fortran supports the following languages:

  1. Assembly
  2. BASIC
  3. C/C++
  4. Fortran – Free and Fixed formats
  5. Makefile
  6. Python
  7. Microsoft DOS/Windows Batch
  8. Lua
  9. HTML
  10. UNIX-like Shells (Bash, sh, etc.)
  11. Tcl

Changing Languages

The language currently set by the editor can be modified using entries in the Language submenu in the Edit menu . The entries in this menu can be used at any time. However, the feature is especially useful when starting with a new file; the language in use by the editor can be set by the user prior to saving the file.

Folding

Folding refers to the ability to expand and contract structures within source code. Folding can be used to hide source code to improve readability when editing code. Folding is only available for the languages stated above.

All folding is handled in the left margin of the editor. Next to code portions in the editor will be simple minus and plus signs that signify code sections can be contracted or expanded respectively. Folding and unfolding code does actually remove any code from the editor.

Real-time Syntax Checking

Simply Fortran supports syntax checking within the editor while working with Fortran files. More information is available in on the Syntax page.

Autocomplete

Simply Fortran supports autocomplete functionality when working with Fortran source code. Autocomplete is enabled in the following scenarios:

Module Import

When a user is entering the name of a module to use, Simply Fortran can display a small box listing all known modules in the project. Using the arrows and the Enter key, the user may select a known module for use in the current program unit. An example is shown below:

Additionally, if the only keyword is used in a use statement, the names of all subroutines and functions available in the selected module will appear in a dialog next to the current cursor.

Derived Type Children

When working with derived types, Simply Fortran can display the child elements of variables in a variable of a known derived type in an autocomplete popup. When the user enters the % symbol to designate the selection of a child element, a dialog will appear listing the derived type’s elements:

Autocomplete is fully supported in the Fortran languages. When working with Python source code, limited autocomplete functionality is provided for member functions of the current class. This functionality can be enabled or disabled in the Editor Options dialog.

Fortran Intrinsic Tips

If this option is enabled , a help box will appear when entering an intrinsic procedure while editing Fortran source code. The short summary of the intrinsic can assist in understanding the various options associated with the intrinsic procedure. This feature is only available when editing Fortran source code.

User-Defined Subprogram Tips

Simply Fortran internally indexes all project Fortran subroutines and functions. While editing Fortran source code, Simply Fortran can display function and subroutine definitions while typing calls. Once an opening parentheses is entered, the index is searched for likely function and subroutine definitions, and the defining statement is displayed as a tip within the editor to assist the user.

See Also

Editing in Simply Fortran
Editor Options