Fortran 90 Introductory Course
1. Introduction
Introduction to the course
2. Basics
welcome.f90
- Statements in general, compiling and running, Print statement, comments and End statement.
square.f90
- Variables, declarations, Integer data type, Read statement, assignment.
basic_arithmetic.f90
- Arithmetic operators and Real data type.
intrinsics.f90
- Examples of some Intrinsic functions.
Exercises 2.
3. Control statements and arrays
square_list.f90
- Arrays and Do loops
square_list2.f90
- Do loops with variable limits
square_list3.f90
- If blocks
square_list4.f90
- Nested If blocks
lottery_draw.f90
- Logical data type, Indefinite Do loops, Exit statement and Intrinsic subroutines
stop_example.f90
- Stop statement
square_list_dynamic.f90 & square_list_dynamic_check.f90
- Dynamic array dimensioning
times_table.f90 & times_table_dynamic.f90
- 2-Dimensional arrays and dynamic dimensioning of 2-dimensional arrays
Exercises 3.
4. File access
lottery_draw_and_remember.f90
- Open, Close and Write statements
lottery_draw_frequency.f90
- Read statement, End clause and Labelled statements
Exercises 4.
5. Functions and Subroutines
circle_area.f90
- User-defined functions.
circle_area2.f90
- Return statement.
square_and_cube.f90
- User-defined subroutines.
my_sort.f90
- Further example of a user-defined subroutine.
Exercises 5.
6. Other data types
my_name_sort.f90
- Character data type.
open_file.f90
- Use of character data to specify an input or output file at run-time.
reply.f90
- Character substrings
double_arithmetic.f90
- Double precision data type.
complex_arithmetic.f90
- Complex data type.
Exercises 6.
7. Sub-program Libraries and Modules
circle_area_main.f90 & circle_area_function.f90
- Separate compilation of sub-programs.
nag_example.f90
- The Nag numerical subroutine library and Passing functions and subroutines as arguments.
nag_example2.f90 & coefficients.f90
- Modules and their use for global data.
circle_operations.f90 & use_circle_operations.f90
- Modules for global data and sub-programs.
arguments_wrong_module.f90 & arguments_wrong_main.f90
- Advantage of module sub-programs over external library sub-programs.
Exercises 7.
8. More on Input and Output
open_old_file_check.f90 & open_new_file_check.f90
- Error checking in Open statement.
read_error.f90
- Error checking in Read statement.
square_list_formatted.f90
- Character, Integer and New line Format specifiers.
double_arithmetic_formatted.f90
- Real fixed-point format specifier.
print_big_numbers.f90
- Real scientific format specifier.
Exercises 8.
9. Miscellaneous
longer_expressions.f90
- Rules about how more complex expressions are evaluated.