# Tutorials

**URL:** https://fortran-lang.discourse.group/c/tutorials/8.md

[Latest](https://fortran-lang.discourse.group/latest.md) · [Categories](https://fortran-lang.discourse.group/categories.md)

---

## [About the Tutorials category](https://fortran-lang.discourse.group/t/about-the-tutorials-category/306)

<div class="topic-metadata">

**Author:** [@milancurcic](https://fortran-lang.discourse.group/u/milancurcic)\
**Replies:** 0

</div>

Use this tag to post any tutorials (written or video), explanations, or otherwise helpful resources.

---

## [Monty Hall Problem Simulation](https://fortran-lang.discourse.group/t/monty-hall-problem-simulation/11108)

<div class="topic-metadata">

**Author:** [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Replies:** 6\
**Last updated:** [September 22, 2026, 3:18am UTC](https://fortran-lang.discourse.group/t/monty-hall-problem-simulation/11108 "2026-09-22T03:18:18Z")

</div>

There is a popular online puzzle called the Monty Hall Problem. This puzzle dates to a letter by Steve Selvin published in the journal American Statistician in 1975. Similar statistical problems had been published by Ma…

---

## [Euler Sum of Powers Conjecture: Tutorial](https://fortran-lang.discourse.group/t/euler-sum-of-powers-conjecture-tutorial/10678)

<div class="topic-metadata">

**Author:** [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Replies:** 8\
**Last updated:** [May 4, 2026, 11:48pm UTC](https://fortran-lang.discourse.group/t/euler-sum-of-powers-conjecture-tutorial/10678 "2026-05-04T23:48:08Z")

</div>

This information is also posted in Euler Conjecture and CDC 6600 - #82 by RonShepard. I have written an initial draft of a short paper that summarizes the contents of the previous Euler conjecture discussion thread. It …

---

## [Unicode documentation available on the Fortran Wiki](https://fortran-lang.discourse.group/t/unicode-documentation-available-on-the-fortran-wiki/10469)

<div class="topic-metadata">

**Author:** [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Replies:** 2\
**Last updated:** [April 6, 2026, 8:18am UTC](https://fortran-lang.discourse.group/t/unicode-documentation-available-on-the-fortran-wiki/10469 "2026-04-06T08:18:08Z")

</div>

A new document regarding Unicode has been added to the Fortran Wiki that includes links to Fortran modules implementing solutions to some of the remaining issues with Unicode usage in Fortran plus dozens of example pro…

---

## [Visualizing Fortran Projects with fpm: Create Stunning Module Dependency Charts](https://fortran-lang.discourse.group/t/visualizing-fortran-projects-with-fpm-create-stunning-module-dependency-charts/9838)

<div class="topic-metadata">

**Author:** [@davidpfister](https://fortran-lang.discourse.group/u/davidpfister)\
**Replies:** 31\
**Last updated:** [March 5, 2026, 5:19pm UTC](https://fortran-lang.discourse.group/t/visualizing-fortran-projects-with-fpm-create-stunning-module-dependency-charts/9838 "2026-03-05T17:19:23Z")

</div>

I just created the project fpm-modules, a fpm plugin to generate module dependency graphs. Since it took me some time and research to create it, I wrote a tutorial out of it, hoping it could be useful for anyone else wi…

---

## [How to use FORD for your documentation](https://fortran-lang.discourse.group/t/how-to-use-ford-for-your-documentation/8272)

<div class="topic-metadata">

**Author:** [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Replies:** 8\
**Last updated:** [February 5, 2026, 10:55am UTC](https://fortran-lang.discourse.group/t/how-to-use-ford-for-your-documentation/8272 "2026-02-05T10:55:45Z")

</div>

I think it would be interesting to have a thread where people share their knowledge about using FORD. Until now, I had two projects with a FORD documentation but the main steps were carried out by collaborators. After st…

---

## [Select a part of a function's result](https://fortran-lang.discourse.group/t/select-a-part-of-a-functions-result/10504)

<div class="topic-metadata">

**Author:** [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Replies:** 2\
**Last updated:** [November 19, 2025, 7:48am UTC](https://fortran-lang.discourse.group/t/select-a-part-of-a-functions-result/10504 "2025-11-19T07:48:30Z")

</div>

I was inspired by @rouson et al.‘s paper on “Julienne” for this little program. It shows how you can select a part of the result of a function without first explicitly storing it. You cannot do: x = func\_returning\_array…

---

## [Booklet «Fortran 95 language features»](https://fortran-lang.discourse.group/t/booklet-fortran-95-language-features/10495)

<div class="topic-metadata">

**Author:** [@nbehrnd](https://fortran-lang.discourse.group/u/nbehrnd)\
**Replies:** 0\
**Last updated:** [November 15, 2025, 3:35pm UTC](https://fortran-lang.discourse.group/t/booklet-fortran-95-language-features/10495 "2025-11-15T15:35:25Z")

</div>

The learning section was amended. By now, the documentation additionally features a copy of Mike Metcalf’s Fortran 95 language features previously stored on Wikipedia only. This was possible thanks to @m\_b\_metcalf (aut…

---

## [PSA about Cray Fortran compiler pattern matching](https://fortran-lang.discourse.group/t/psa-about-cray-fortran-compiler-pattern-matching/10441)

<div class="topic-metadata">

**Author:** [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Replies:** 5\
**Last updated:** [October 14, 2025, 10:15am UTC](https://fortran-lang.discourse.group/t/psa-about-cray-fortran-compiler-pattern-matching/10441 "2025-10-14T10:15:51Z")

</div>

This is mostly so that there’s breadcrumbs that document the Cray compiler pattern matching technology and its effects on code outside documentation :slight\_smile: The cray compiler has these options: -hp…

---

## [Complex solutions to 1\*\*x=4](https://fortran-lang.discourse.group/t/complex-solutions-to-1-x-4/9948)

<div class="topic-metadata">

**Author:** [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Replies:** 8\
**Last updated:** [July 27, 2025, 10:31pm UTC](https://fortran-lang.discourse.group/t/complex-solutions-to-1-x-4/9948 "2025-07-27T22:31:51Z")

</div>

This is a short code to demonstrate some features of fortran using complex arithmetic. There is a familiar online puzzle to find solutions to the equation 1^x=4 (or some other right-hand-side value). There are of course…

---

## [Fortran is dead – Long live Fortran!](https://fortran-lang.discourse.group/t/fortran-is-dead-long-live-fortran/7654)

<div class="topic-metadata">

**Author:** [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Replies:** 9\
**Last updated:** [June 27, 2025, 4:50pm UTC](https://fortran-lang.discourse.group/t/fortran-is-dead-long-live-fortran/7654 "2025-06-27T16:50:23Z")

</div>

Torsten Hoefler’s random access spontaneous talk given at the 42nd anniversary Salishan Conference on High-Speed Computing in 2023. Discusses how to lift Fortran code to a data-centric representation to optimize it for a…

---

## [Consolidated Thread for "The 'F' Word" Livestreams & Videos](https://fortran-lang.discourse.group/t/consolidated-thread-for-the-f-word-livestreams-videos/2679)

<div class="topic-metadata">

**Author:** [@fluidnumerics\_joe](https://fortran-lang.discourse.group/u/fluidnumerics_joe)\
**Replies:** 20\
**Last updated:** [January 29, 2025, 9:25pm UTC](https://fortran-lang.discourse.group/t/consolidated-thread-for-the-f-word-livestreams-videos/2679 "2025-01-29T21:25:02Z")

</div>

Subscribe to Fluid Numerics YouTube channel The Next Livestream (TBD) Simulating Kelvin Waves using the Spectral Element Library in Fortran Upcoming Videos Some commentary and ranting below :slight\_smile: …

---

## [Using Unicode Characters in Fortran](https://fortran-lang.discourse.group/t/using-unicode-characters-in-fortran/2764)

<div class="topic-metadata">

**Author:** [@plevold](https://fortran-lang.discourse.group/u/plevold)\
**Replies:** 35\
**Last updated:** [January 20, 2025, 2:54pm UTC](https://fortran-lang.discourse.group/t/using-unicode-characters-in-fortran/2764 "2025-01-20T14:54:32Z")

</div>

I found that there’s very little information around on how to use Unicode characters in Fortran so I did a small writeup covering my experiences with the topic. The examples are available here if anyone want’s to try the…

---

## [Bridging Fortran and Python: A Practical Mini-Course and Resources](https://fortran-lang.discourse.group/t/bridging-fortran-and-python-a-practical-mini-course-and-resources/8899)

<div class="topic-metadata">

**Author:** [@ofmla](https://fortran-lang.discourse.group/u/ofmla)\
**Replies:** 1\
**Last updated:** [November 29, 2024, 7:54am UTC](https://fortran-lang.discourse.group/t/bridging-fortran-and-python-a-practical-mini-course-and-resources/8899 "2024-11-29T07:54:06Z")

</div>

Hi everyone, I delivered a 4-hour mini-course last year on integrating Fortran with Python, and since this is a topic that’s frequently discussed here on Discourse, I thought it would be worth sharing the materials. The…

---

## [Fortran textbook](https://fortran-lang.discourse.group/t/fortran-textbook/8860)

<div class="topic-metadata">

**Author:** [@victotronics](https://fortran-lang.discourse.group/u/victotronics)\
**Replies:** 2\
**Last updated:** [November 22, 2024, 9:53am UTC](https://fortran-lang.discourse.group/t/fortran-textbook/8860 "2024-11-22T09:53:19Z")

</div>

I have an open source C++/Fortran textbook. See https://theartofhpc.com/ and go to volume 3. Comments always welcome.

---

## [Blog post - Creating a Conda package from Fortran using fpm and rattler-build](https://fortran-lang.discourse.group/t/blog-post-creating-a-conda-package-from-fortran-using-fpm-and-rattler-build/8789)

<div class="topic-metadata">

**Author:** [@samharrison7](https://fortran-lang.discourse.group/u/samharrison7)\
**Replies:** 3\
**Last updated:** [November 6, 2024, 6:44pm UTC](https://fortran-lang.discourse.group/t/blog-post-creating-a-conda-package-from-fortran-using-fpm-and-rattler-build/8789 "2024-11-06T18:44:30Z")

</div>

I’ve been messing around a bit with Pixi and rattler-build\* recently and thought it would be useful to write a blog post on how to use rattler-build to build a Conda package from Fortran code, using fpm as the build scri…

---

## [Compiler Explorer include trick](https://fortran-lang.discourse.group/t/compiler-explorer-include-trick/8649)

<div class="topic-metadata">

**Author:** [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Replies:** 5\
**Last updated:** [October 1, 2024, 1:36pm UTC](https://fortran-lang.discourse.group/t/compiler-explorer-include-trick/8649 "2024-10-01T13:36:15Z")

</div>

I often use Compiler Explorer to test out new Fortran ideas. Today I’ve just discovered that the C include mechanism can also be used to fetch files at internet locations. To demonstrate this, I’ve attached to this post…

---

## [Novice tries using AI code generators](https://fortran-lang.discourse.group/t/novice-tries-using-ai-code-generators/8125)

<div class="topic-metadata">

**Author:** [@mecej4](https://fortran-lang.discourse.group/u/mecej4)\
**Replies:** 9\
**Last updated:** [September 30, 2024, 12:34pm UTC](https://fortran-lang.discourse.group/t/novice-tries-using-ai-code-generators/8125 "2024-09-30T12:34:33Z")

</div>

Having seen a number of posts in this forum and elsewhere wherein the use of AI code generators was discussed, I decided to step into the swamp today. Some readers may find my experience interesting, and a smaller number…

---

## [Mathematics of arrays](https://fortran-lang.discourse.group/t/mathematics-of-arrays/1685)

<div class="topic-metadata">

**Author:** [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Replies:** 74\
**Last updated:** [September 28, 2024, 10:30pm UTC](https://fortran-lang.discourse.group/t/mathematics-of-arrays/1685 "2024-09-28T22:30:45Z")

</div>

Some weeks ago a group was created on Slack that is discussing the possibilities of “mathematics of arrays” (MoA) within the context of Fortran. The idea of this methodology is to express algorithms in such a way that th…

---

## [Wiki page on basic timing with Fortran Intrinsics](https://fortran-lang.discourse.group/t/wiki-page-on-basic-timing-with-fortran-intrinsics/8650)

<div class="topic-metadata">

**Author:** [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Replies:** 1\
**Last updated:** [September 25, 2024, 11:22pm UTC](https://fortran-lang.discourse.group/t/wiki-page-on-basic-timing-with-fortran-intrinsics/8650 "2024-09-25T23:22:53Z")

</div>

Seeing some recent Tutorials appear here is inspirational. I’ll give a try at one … Basic use of the Fortran intrinsics for timing comes up repeatedly. It is not as straight-forward as it first appears. So, gleaning in…

---

## [DevContainer for Fortran/C/CXX/Python3 development](https://fortran-lang.discourse.group/t/devcontainer-for-fortran-c-cxx-python3-development/8231)

<div class="topic-metadata">

**Author:** [@jamestpp](https://fortran-lang.discourse.group/u/jamestpp)\
**Replies:** 0\
**Last updated:** [June 19, 2024, 6:32pm UTC](https://fortran-lang.discourse.group/t/devcontainer-for-fortran-c-cxx-python3-development/8231 "2024-06-19T18:32:34Z")

</div>

Hello Community Please make use of this devcontainer.

---

## [Hiding implementation details (the Bridge pattern)](https://fortran-lang.discourse.group/t/hiding-implementation-details-the-bridge-pattern/7833)

<div class="topic-metadata">

**Author:** [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Replies:** 2\
**Last updated:** [April 13, 2024, 9:31am UTC](https://fortran-lang.discourse.group/t/hiding-implementation-details-the-bridge-pattern/7833 "2024-04-13T09:31:53Z")

</div>

The bridge pattern is one of the famous patterns introduced by the Gang of Four, meant to “decouple an abstraction from its implementation so that the two can vary independently”. The main purposes of the pattern are, t…

---

## [Fortran lectures using fpm](https://fortran-lang.discourse.group/t/fortran-lectures-using-fpm/2878)

<div class="topic-metadata">

**Author:** [@awvwgk](https://fortran-lang.discourse.group/u/awvwgk)\
**Replies:** 6\
**Last updated:** [August 9, 2023, 7:50pm UTC](https://fortran-lang.discourse.group/t/fortran-lectures-using-fpm/2878 "2023-08-09T19:50:46Z")

</div>

Is anyone aware of lectures or courses teaching Fortran making use of the Fortran Package Manager (fpm)? So far I’m aware of those two: University of Bonn, Master of Chemistry course (3.5hrs per week, 6 weeks, beginn…

---

## [Python Fortran Rosetta Stone Ported from Fortran 90!](https://fortran-lang.discourse.group/t/python-fortran-rosetta-stone-ported-from-fortran-90/5907)

<div class="topic-metadata">

**Author:** [@henilp105](https://fortran-lang.discourse.group/u/henilp105)\
**Replies:** 13\
**Last updated:** [August 6, 2023, 1:41pm UTC](https://fortran-lang.discourse.group/t/python-fortran-rosetta-stone-ported-from-fortran-90/5907 "2023-08-06T13:41:58Z")

</div>

We’re thrilled to announce that the Python Fortran Rosetta Stone has been successfully ported from fortran90.org! to fortran-lang.org We are grateful to the original owners (@certik) of the content for opensourcing it …

---

## [Enabling/disabling debug output](https://fortran-lang.discourse.group/t/enabling-disabling-debug-output/6155)

<div class="topic-metadata">

**Author:** [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Replies:** 13\
**Last updated:** [July 18, 2023, 2:00am UTC](https://fortran-lang.discourse.group/t/enabling-disabling-debug-output/6155 "2023-07-18T02:00:39Z")

</div>

In the thread Speed of Writing to File vs /dev/null it is suggested to use preprocessing to ensure the debug output that you do not need does not hamper optimisation. While I cannot be sure that the technique I present h…

---

## [Implementing LC-3 in Fortran](https://fortran-lang.discourse.group/t/implementing-lc-3-in-fortran/6150)

<div class="topic-metadata">

**Author:** [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Replies:** 4\
**Last updated:** [July 17, 2023, 4:57pm UTC](https://fortran-lang.discourse.group/t/implementing-lc-3-in-fortran/6150 "2023-07-17T16:57:49Z")

</div>

I’m writing a virtual machine for the Little Computer 3, an educational computer from the textbook of Patt & Patel (2003) \[1\]. It’s a great way to learn about computer architecture, hence I decided to make a tutorial-lik…

---

## [Fortran For Building ML Models](https://fortran-lang.discourse.group/t/fortran-for-building-ml-models/6135)

<div class="topic-metadata">

**Author:** [@eikeakanam](https://fortran-lang.discourse.group/u/eikeakanam)\
**Replies:** 5\
**Last updated:** [July 12, 2023, 11:14pm UTC](https://fortran-lang.discourse.group/t/fortran-for-building-ml-models/6135 "2023-07-12T23:14:35Z")

</div>

I am working on the suitability of Fortran for building ML models, Please can anyone suggest useful resources for building ML models using Fortran.

---

## [How to hack my cfwrapper to generate Fortran interfaces for C prototypes](https://fortran-lang.discourse.group/t/how-to-hack-my-cfwrapper-to-generate-fortran-interfaces-for-c-prototypes/5500)

<div class="topic-metadata">

**Author:** [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Replies:** 5\
**Last updated:** [June 30, 2023, 1:37pm UTC](https://fortran-lang.discourse.group/t/how-to-hack-my-cfwrapper-to-generate-fortran-interfaces-for-c-prototypes/5500 "2023-06-30T13:37:34Z")

</div>

I have written a How-to for people wanting to try to use (to hack) the gtk-fortran Python cfwrapper with other C libraries: As it was polished for 12 years, you may obtain very good results with “clean” C header files…

---

## [Fortran tutorial videos](https://fortran-lang.discourse.group/t/fortran-tutorial-videos/5953)

<div class="topic-metadata">

**Author:** [@Oleksandr\_Ts](https://fortran-lang.discourse.group/u/Oleksandr_Ts)\
**Replies:** 5\
**Last updated:** [June 15, 2023, 5:46am UTC](https://fortran-lang.discourse.group/t/fortran-tutorial-videos/5953 "2023-06-15T05:46:22Z")

</div>

Hi all. I present my YouTube channel dedicated to learning programming in Fortran. The language of lectures is Russian. There are tutorial videos, practical work and homework. All material in the open and free access. I …

---

## [Fortran Teaching](https://fortran-lang.discourse.group/t/fortran-teaching/5825)

<div class="topic-metadata">

**Author:** [@JerryD](https://fortran-lang.discourse.group/u/JerryD)\
**Replies:** 5\
**Last updated:** [May 26, 2023, 5:13pm UTC](https://fortran-lang.discourse.group/t/fortran-teaching/5825 "2023-05-26T17:13:01Z")

</div>

I have been doing a bit of thinking lately. I know of some young people who were shown and taught some programing examples that included Fortran and Python and I think C. I was not involved directly in this but, they ha…

[Next page](https://fortran-lang.discourse.group/c/tutorials/8.md?page=1)
