3 ms·
When I learned FORTRAN, I recall each line of code was prefixed by a numeric label. From the “Hello, World!” presented on the website, it looks like that’s no l
by divbzero 3y ago
When I learned FORTRAN, I recall each line of code was prefixed by a numeric label. From the “Hello, World!” presented on the website, it looks like that’s no longer the case in modern FORTRAN?
program hello
! This is a comment line; it is ignored by the compiler
print *, 'Hello, World!'
end program hello
https://fortran-lang.org/en/learn/quickstart/hello_world/ https://fortran-lang.org/en/learn/quickstart/hello_world/
- pklausler 3y agoLabels are no more and no less optional than they ever were; any statement that starts a line may be labeled. Fortran has had IF THEN / END IF and DO / END DO since F'77, so the need for statement labels has greatly decreased. You still see them on FORMAT statements, of course.