r/fortran

▲ 33 r/fortran

Fortran For C Programmers

I am posting this guide, from the developers of flang, because people, often with a C or C++ background, often ask how to get started with Fortran.

flang.llvm.org
u/Beliavsky — 5 days ago

Snoopy calendar history?

There's a famous program that creates a "Snoopy" calendar.

https://gunkies.org/wiki/Snoopy_Calendar has a copy of a version modified by T. M. Kennedy in 1984.

Does the original version exist somewhere? Do we know who wrote it? I saw someone offering a copy on Github a few years ago but I don't know if that ever actually happened.

Incidentally, despite the comments in the modified version suggesting it should work on an IV compiler, it doesn't. After fixing the syntax error in snppic with INUM(I) in the do loop (easy to just do INUMI=INUM(I) first and use INUMI, the bound is sometimes -1. It encounters the issue where DO loops in some IV compilers execute at least once (66 says the scenario is not allowed, I guess that's FORTRAN-speak for undefined? 77 says the loop occurs 0 times). Easy to change the condition above it from IF (INUM(I) .EQ. 0) GOTO 40 to IF (INUM(I) .LE. 0) GOTO 40

reddit.com
u/Sgeo — 6 days ago
▲ 35 r/fortran

Help regarding where to start fortran

Hi, so I have a background in c++ and matlab in programming. I started my phd and my prof asked me to move to fortran. I want to ask how should I start and where to start in fortran. At the moment I know nothing in fortran. Can you share some sources or material for me to start. Or where do you guys started. Thank you

reddit.com
u/Aggravating_Lie7356 — 10 days ago
▲ 50 r/fortran

Here is some code examples for new Fortran programmers.

A request for help led me to go through my old Fortran codes. For that reason, I gathered some old programs I found in this repo: https://github.com/foxapiens/Fortran-Starter . And maybe I will continue adding code files and information about their purpose here. At least, it may be useful for beginners.

u/Lamda-f90 — 10 days ago