Fortran中的双引号和单引号之间的区别? [英] Difference between double and single quotation marks in fortran?

查看:612
本文介绍了Fortran中的双引号和单引号之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案

我们刚刚开始使用Fortran,并且对双引号和单引号的使用感到困惑。当量。



您可以使用此功能打印其中一个报价字符:

  print *,'

print *,''

首先打印'然后



注意:您也可以使用一行中的两个报价字符来打印:

  print *, 

打印*,''''

code>然后'


I'm just starting out on Fortran and am confused with the usage of double vs single quotation marks

解决方案

They are equivalent. There is no difference in their usage.

You can employ this to print one of the quotation characters:

print *, "'"

print *, '"'

prints first ' and then ".

Note: You can also use two quote characters in a row to print one:

print *, """"

print *, ''''

prints first " and then '.

这篇关于Fortran中的双引号和单引号之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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