Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
608 views
in Technique[技术] by (71.8m points)

encoding - Difference between double and single quotation marks in fortran?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 '.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...