Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 369
Zen Avatar asked Jun 23 '15 08:06

Zen


People also ask

What is the difference between single and double quotation marks?

General Usage Rules In America, Canada, Australia and New Zealand, the general rule is that double quotes are used to denote direct speech. Single quotes are used to enclose a quote within a quote, a quote within a headline, or a title within a quote.

What's the difference between a single quote and a double quote in bash?

If you're referring to what happens when you echo something, the single quotes will literally echo what you have between them, while the double quotes will evaluate variables between them and output the value of the variable.

What are single quotation marks used for?

Single quotation marks are also known as 'quote marks', 'quotes', 'speech marks' or 'inverted commas'. Use them to: show direct speech and the quoted work of other writers. enclose the title of certain works.

Why use single quotes instead of double quotes?

The most common reason to use single quotation marks is to quote someone who is quoting someone else. The rules are different in British English, but in American English, you enclose the primary speaker's comments in double quotation marks, and then you enclose the thing they are quoting in single quotation marks.


1 Answers

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

like image 112
Vladimir F Героям слава Avatar answered Oct 07 '22 20:10

Vladimir F Героям слава