Skip to content

Input and output – First part

Printing to standard output

Remember that standard output is the screen if you have not redirected it.

print *, list of expressions

If you want print an empty line, you use print without a list fo expressions:

print *

Reading from standard input

Remember that standard input is the keyboard if you have not redirected it.

read *, list of variables
  • Values read are interpreted automatically according to the type of the corresponding variable (so you do not write code to convert from character type, as in Python).

  • If the variable is of type character, there is usually no need to delimit the corresponding input values with quotes.

  • You can type input values on one or several lines, as you want.