You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
real, dimension(N) :: array ! version 1real:: array(N) ! version 2! Similarly...real, dimension(:) :: array ! version 1real:: array(:) ! version 2
Fortran developers often code as if they're paid per keystroke, so I would assume version 1 to be the preferred method, but the Fortran-Lang page on learning arrays uses version 2 throughout. Either way, it should be kept consistent throughout a project, and a rule should exist to enforce this. I'd lean towards version 2 as it makes it much easier to stay within line-length limits, especially when you also start writing in kinds, intents, allocatable, pointer, target, contiguous, etc.
The text was updated successfully, but these errors were encountered:
Fortran developers often code as if they're paid per keystroke, so I would assume version 1 to be the preferred method, but the Fortran-Lang page on learning arrays uses version 2 throughout. Either way, it should be kept consistent throughout a project, and a rule should exist to enforce this. I'd lean towards version 2 as it makes it much easier to stay within line-length limits, especially when you also start writing in kinds, intents, allocatable, pointer, target, contiguous, etc.
The text was updated successfully, but these errors were encountered: