Should tutorials on fortran-lang.org follow a consistent style for code listings?

I set up a basic poll with some examples here: Poll: Preferred style for tutorial code listings

1 Like

It will be awesome if a team can work toward some ‘beautify’ script or a tool that can take Fortran snippets, examples, tutorials submitted by contributors and transform the code into the agreed-upon style specification .

Readers here will have noticed facilities like this already exist in certain editors and IDEs, particularly with indentation where the editor/IDE can ‘format indent’ a selection or a document to desired style such as with 2 or 3 or 4 spaces as requested by the user.

Now, with Fortran given its legacy since the IBM mainframe days, there is also the question of whether the tokens recognized by the language (‘program’, ‘integer’, ‘print’, ‘end’, and on and on) should be uppercase or lowercase or some other mixed case style. Should a contributor prefer uppercase for language tokens (note I’ve come across quite a few long-time Fortranners who insist on this) but if this site were to settle on another, the tutorial ‘editor’ at this site can quickly transform the submitted code with a code formatter for a consistent style.

1 Like