Fortran中的advance ='no'是什么意思? [英] What does advance='no' mean in Fortran?

查看:947
本文介绍了Fortran中的advance ='no'是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Fortran的新手,但我不明白这一行:

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

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

在:

  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.

推荐答案

advance='no'意味着write语句在完成编写后不会前进到下一条记录(下一行).

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

请参见在Fortran 95写语句中禁止换行符 以及其他相关的问题和答案.

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

这篇关于Fortran中的advance ='no'是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆