Title here
Summary here
Our first program will demonstrate various value types including strings, integers, floats, and booleans. Here’s the full source code:
To run the program, save the code in a file named values.f90
and use your Fortran compiler. For example, if you’re using gfortran:
In this example:
//
operator..and.
, .or.
, and .not.
instead of symbols..true.
and .false.
for boolean values.print *
statement is used for output, similar to fmt.Println
in the original example.Note that Fortran is case-insensitive, so TRUE
and true
would be equivalent. Also, Fortran has no built-in boolean type, instead using logical type which can be .true.
or .false.
.
This example demonstrates basic value types and operations in Fortran, providing a foundation for more complex programs.