3

I am new to Fortran and I dont understand this line:

  write(*,'(a35)', advance='no')

in:

  program democonvertion

  implicit none

  real :: tc, tf, tr, tk

  write(*,'(a35)', advance='no')
 &      "Enter the temperature in Celcius: "
  read(*,*) tc

  tf = (9./5) * tc + 32
  tr = (4./5) * tc
  tk = tc + 273

  write(*,*)
  write(*,'(4a11)') "Celcius","Farenheit","Reamur","Kelvin"
  write(*,'(4f11.2)') tc, tf, tr, tk

  end program democonvertion

I already compiled this code and it works. But I still don't understand.

mr.taco
  • 31
  • 1
  • 1
  • 6

1 Answers1

8

advance='no' means that the write statement will not advance to the next record (next line) after finishing the writing.

See Supressing line breaks in Fortran 95 write statements and other related questions and answers.