-
Notifications
You must be signed in to change notification settings - Fork 7
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
Further documentation improvements #31
Comments
So are you changing SPTRUN(.. to lowercase?. This does sound like a good idea to standardize the case of our codes Fortran is case insensitive as you know so perhaps we should just run everything through tr to change everything to lowercase |
Actually it is a little more inconsistent than I would like. ;-) If there is a function called func_1(), then in Fortran I can write func_1() or FUNC_1, or even FuNc_1() and it will work. But in doxygen, only func_1() will generate the auto-link to the function documentation. In other words, Fortran does not care, but doxygen demands all lower-case function and subroutine names, to get links working., And links are really really great. So it's worth lower-casing the names in the docs, so that the links work, and hoping our users understand that fortran does not notice case at all. |
In terms of pre-processing, it seems that all the fortran compilers have settled on cpp, and it is pretty standardized when used correctly (yes, it is all case sensitive!) Pre-processor commands are great in the correct places, but should not be over-used. What should be understood is that every time you use an #ifdef you are requiring another CI run, so this gets expensive quick, or, more typically, masses of ifdefs are added but never used in testing, which is just as bad as untested code. Preprocessor code is great when substituting a value in from configure (like the version number), or handling build options (like openmp on or off). |
I will also note that typically fortran 77 may be all upper-case, but Fortran 90 is usually lower-case code, IME. This is simply because the lower-case letters were introduced before F77, so by F90, everyone has them. ;-) |
Well my 15 second suggestion to use tr to change cases will break stuff, in particular any formatted writes that fortran does. They'll still survive execution fine but capitalization which we want in a print to make it readable, would be destroyed if everything went to lowercase so I'll take that back. But making all of the code lowercase is a good idea. |
We cannot just blindly make the code lower-case, as you note, but can do so with care, once good testing is in place. But for this batch of changes, only doxygen is being worked on and lower-cased. Code is remaining untouched. |
@AlexanderRichert-NOAA I have added you to this issue. Thanks for the help! Please mention this issue in your documentation PRs. |
The documentation can be improved by:
The text was updated successfully, but these errors were encountered: