Fortran 2: Extra Keywords and Making a Makefile

Опубликовано: 19 Февраль 2026
на канале: DJ's Office Hours
4,486
164

#fortran #tutorial #programming

This is a continuation of my previous crash course video on Fortran. In this video I speak pretty high-level and cover the myriad of keywords that are in the Fortran syntax (and there is still a lot more I didn't get to cover). I mainly covered keywords that I come across a lot and thought we be beneficial. I didn't compile or run anything in this case, because I didn't want this video to drag on too long, but did want to mention these and give a light description if you come across it in your Fortran careers.

***** THINGS I FORGOT TO MENTION *****
For `Pure` functions, you cannot print inside them, so if you like using print statements for checking your code, you'll have to take off the `Pure` prefix or debug it in GDB.
`Elemental` can be mixed with `Pure` in functions
Similar to how I showed there is a `continue` there is also a `stop` which would stop the block of code and exit out
I showed `make` to compile stuff, and would run `make clean` to remove all the files again to clean up my directory

As you can see, there is a lot to Fortran, and it can be a difficult language to dive into without have a coding background. Hopefully this helped you! I do have other topics I know I can cover in Fortran in the future, and will be coming back to the language as time progress since my Crash Course was popular. (:


SECTIONS
-----------------
0:00 - Intro
0:28 - Using Fortran on Windows
0:46 - Parameter
1:42 - Result
2:08 - Pure
2:40 - Elemental
2:50 - Datatype Definition
3:10 - Precision
3:35 - Commenting
3:55 - Block Titles
4:35 - External
5:12 - Dimension
5:37 - Designing a Makefile


Modern Fortran Book
----------------------------------
https://milancurcic.com/book/


Repo
--------
https://github.com/da-james/djs-offic...


GM: [email protected]
IG:   / djsofficehours  
TT:   / djsofficehours  
T:   / djsofficehours