Title here
Summary here
Fortran has various value types including strings, integers, floats, logicals, etc. Here are a few basic examples.
To run this program, save it as values.f90
and compile it using a Fortran compiler, then execute the resulting binary:
In this Fortran program:
//
operator..true.
and .false.
..and.
, .or.
, and .not.
.Fortran uses different syntax for printing output. The print *
statement is used for standard output, similar to fmt.Println
in the original example.
Note that Fortran is a statically typed language, but type declarations are not necessary in this example due to the use of implicit none
. This statement turns off implicit typing, but the compiler can infer the types from the literals used.