Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Corrections and Amendments to the Fortran "filetype" files #205

merged 2 commits into from Jan 20, 2014


None yet
2 participants

aphirst commented Jan 20, 2014

Several keywords such as concurrent, and those pertaining to coarrays were not present in filetypes.fortran; nor were a whole host of new intrinsic functions, e.g. bitwise comparisons and Bessel functions.

I used my copy of Metcalf & Reid's "Modern Fortran Explained" to ensure that the lists included all those which are considered valid by the current language standard, namely Fortran 2008.

Doing this has accentuated a minor deficiency in Scintilla's Fortran lexer. There are a few tokens in Fortran which are valid either as a keyword or as a function/subroutine.

  • real is used either to denote/declare a variable of type(real), or as a function to cast its input into type(real)
  • all is used either to perform some logical comparison against all elements of an array-valued input, or as part of a directive such as sync all (in that case, for coarrays)

Scintilla, and therefore Geany, will always regard these words as keywords, purely and simply because the "keywords" list occurs before either of the "functions" lists, and there is no conditional logic. I may file a feature request over at Scintilla.

I also removed a garbage word from the .fortran and .f77 files, which was simply two valid keywords accidentally concatenated; presumably during a past commit in which new keywords were added in its vicinity.

codebrainz added a commit that referenced this pull request Jan 20, 2014

Merge pull request #205 from aphirst/fortran-keywords
Corrections and Amendments to the Fortran "filetype" files

@codebrainz codebrainz merged commit df47703 into geany:master Jan 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment