So, I can initialize a string in Fortran with both
CHARACTER(LEN=4)::string
string = "jklm"
and
CHARACTER(LEN=4)::string
string = 'jklm'
What's the difference?
So, I can initialize a string in Fortran with both
CHARACTER(LEN=4)::string
string = "jklm"
and
CHARACTER(LEN=4)::string
string = 'jklm'
What's the difference?
At a glance of the fortan docs, it seems the same for the most part. Though if you plan to use a single quote within a string, use a double quote to enclose it.
// correct
"John's Stuff"
// wrong
'John's Stuff'
Alternatively:
// correct
'She said "Hey!"'
// wrong
"She said "Hey!""
http://www.fortran90.org/src/rosetta.html#strings-and-formatting
Edit: btw, same goes for most programming languages.
Functionally, they are the same. There is no difference at all although "" looks a little bit more readable.