'Hello!' "Hello!"In parameter files read by Glindra programs, there is no difference in meaning between single quoted and double quoted strings, but the syntax for handling special characters and embedded quotes is different between the two.
| \\ | Backslash |
| \' | Single quote character |
| \" | Double quote character. This escape sequence is strictly speaking redundant, since double quotes have no special meaning within single quoted strings. It has been included for compatibility because it exists in other environments, such as the C++ language. |
| \? | Question mark. Also redundant, as ? has no special meaning. |
| \a | Alert (bell) |
| \f | Form feed |
| \n | New line |
| \r | Carriage return |
| \t | Horizontal tab |
| \v | Vertical tab |
| \nnn | The character with the octal ASCII value nnn, where the sequence nnn represents 1 to 3 octal digits. |
| \xnn | The character with the hexadecimal ASCII value nn, where the sequence nn represents exactly 2 hexadecimal digits |
No other backslash escape sequences than these are allowed, so a
backslash that is followed by a character that is not among those
listed above will generate a syntax error.
The quoted string
'It\'s "almost" called PL\\1'yields
It's "almost" called PL\1when the quotes are removed.
All other printing characters are just written as they are, and treated as literals. This includes the backslash character "\", which has no special significance inside double quoted strings.
"It's ""almost"" called PL\1"yields
It's "almost" called PL\1
Since the backslash character is just an ordinary literal character, there is no way of specifying non-printing control characters in a double quoted string. If you need to do that, you'll have to use single quotes instead, and adhere to that syntax.
Otherwise, it's a matter of personal preference which kind of quotes to use. For strings that contain backslashes, such as regular expressions or Windows path names, you may find the double quotes more convenient.