-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Adding flags for specific Fortran standard. #16
Comments
It is definitely possible to add these extra flags for the linter, as described in the Automatically adding the correct flags for each version based on file extension is a little more difficult. Currently there is no granularity in Fortran syntax versions beyond Fixed-Form and Modern (i.e. Free-Form). The appropriate linter is selected based on the current syntax. I can think of two potential approaches:
I don't know that there is any advantage to rigidly sticking to each standard definition, and most people seem to agree that the use of I will have a think about approach 1 above and see if it can't be made workable with a setting like |
Hello, Thanks for your feedback and for the links. I am just learning modern Fortran and wasn't aware of the What I was looking for was just an easy way to set the "std" flag so that I know exactly what features are available, and not end up unknowingly using a feature that is a compiler extension. My guess I do this in my Makefile, and was looking to see if the linter can also do it easily. It seemed that this could be done in SublimeText via file endings; but as you point out this may be I like your idea about "fortran_std_from_filename": true. Let it be false by default and if Just an idea: Is it possible for the linter to parse flags directly from a comment line, say at the top of the file. Then a user can specify flags per file, and continue using "filename.f90" no matter what But this is not an urgent need, as I can always set flags in settings, and sublime text makes it very easy Regards, |
I agree. For now you could set
Should be possible, and that is one option. I will have a think about what the best solution could be. |
Hello,
Thanks for this plugin. It makes writing Fortran much easier!
Is there a way to add flags for specific Fortran standard say, based on file extension?
For example if the file is name.f03 I would like to add " -std='f2003' " , and so on. The default for
gfortran is " -std='gnu' '".
I noticed that I can write Fortran 2003 array literals such as [1, 2, 3] in f95 file and I don't get error from the linter, probably since "-std='gnu' " supports it. I do get error from gfortran when I compile it with
"-std='f95'". I would like to be very specific about the standard used and avoid compiler extensions if
possible.
Regards,
Prasanth
The text was updated successfully, but these errors were encountered: