Skip to content

Commit

Permalink
small changes to fortran intro
Browse files Browse the repository at this point in the history
  • Loading branch information
Albkat authored Apr 11, 2024
1 parent 744c4b7 commit dbf5e74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/prog-fortran.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ exit.

.. admonition:: Exercise 1

Open a new file in ``atom`` and save as ``hello.f90`` in a new directory
Open a new file in an editor and save as ``hello.f90`` in a new directory
in your project directory, you will always create a new directory for
each exercise.

Expand All @@ -94,6 +94,7 @@ exit.
The resulting binary file can be executed, thus usually called executable.

.. code-block:: bash
:caption: bash
gfortran hello.f90 -o helloprog
./helloprog
Expand All @@ -110,6 +111,7 @@ to create an executable, create an empty file ``empty.f90`` and try to translate
it with ``gfortran``.

.. code-block:: bash
:caption: shell
:emphasize-lines: 3
gfortran empty.f90
Expand Down Expand Up @@ -169,6 +171,7 @@ applications like building and running executables or creating new projects.
have to activate the fpm installation by using the ``module`` commands:
.. code:: shell
:caption: shell
export BASH_ENV=/usr/share/lmod/lmod/init/bash
. ${BASH_ENV} > /dev/null
Expand All @@ -179,6 +182,7 @@ applications like building and running executables or creating new projects.
your home directory.
.. code:: shell
:caption: shell
# make environment modules available
export BASH_ENV=/usr/share/lmod/lmod/init/bash
Expand All @@ -191,13 +195,15 @@ applications like building and running executables or creating new projects.
Create a new project with fpm by
.. code-block:: bash
:caption: shell
fpm new --app myprogram
This will initialize a new Fortran project with a simple program setup.
Enter the newly created directory and run it with
.. code-block:: bash
:caption: shell
cd myprogram
fpm run
Expand Down

0 comments on commit dbf5e74

Please sign in to comment.