Skip to content

The tutorial ​

The tutorial teaches FURY in nine short chapters, from a first quantity to a units system of your own. The cookbook then collects short recipes for everyday tasks, and the reference has every rule of the grammar, every type and every error.

Each chapter is a complete program that you can compile and run; every output shown is the real output of that program.

ChapterYou learn
1. A first quantityunits from a string, quantities, arithmetic, printing
2. Defining unitsthe grammar: symbols, aliases, dimensions, names, compound units, main aliases
3. The algebra of unitsproducts, quotients and powers of units; why dimensions matter
4. What FURY refusesthe consistency checks: sums, assignments, definitions; comparisons
5. Conversionsfactors, offsets, several aliases, conversions through a main alias
6. The SI systemunits, prefixes and constants by name or symbol
7. Precision32, 64 and 128 bits quantities, mixed kinds
8. Non-linear conversionsa converter of your own: dBm to mW
9. A units system of yoursextending system_abstract

Compiling the examples ​

With FURY built by FoBiS (see Installation), a chapter compiles as:

bash
gfortran -I lib/mod tutorial_1.f90 lib/libfury.a -o tutorial_1

The programs are in docs/examples/src.

Start with 1. A first quantity.

Released under GPL v3, BSD 2-Clause, BSD 3-Clause or MIT, at your choice.