I think I've seen some, I know I've used them with no problems, however, it's my opinion that best practice is to use double backslashes within quotes. Below is the best explanation for this that I've seen in our forums...but people still persist in "their way and my highway" sort of practice.
From this thread at Elvas
http://www.elvastower.com/forums/ind...20#entry201880
Post# 24
Posted Today, 09:52 PM
James Ross "Backslashes must be doubled up because of support for escape codes (\n and \t). (Personally, I would only have expected this inside quoted strings, but OR does it outside as well.)"
View Postcr-stagg, on 29 April 2016 - 12:23 PM, said:
Also the question about 1 or 2 slashes. See this post by James Ross http://www.elvastowe...post__p__182993
James Ross "Backslashes must be doubled up because of support for escape codes (\n and \t). (Personally, I would only have expected this inside quoted strings, but OR does it outside as well.)"
The backslash ( \ ) is the correct path separation character for Microsoft Windows. This is a holdover from MS-DOS.
In "C" programming languages (e.g. C, C++, C#), the backslash is a special character in text string data. The backslash signals the start of an escape, which in these computer terms means a special embedded code to represent non-printable or non-textual data. The curious can read more about this here. What this means, though, is that a single backslash in a text string is invalid and makes no sense, sort of like dividing by zero. To actually have a backslash, its escape sequence must be used, which is two: \\
Escaped or continued (across multiple physical lines—this is common in .trk files) MSTS strings should always be double-quoted.
Adding to point #1, the forward slash ( / ) may be sometimes accepted as a substitute for a backslash in Windows paths, but this is not official nor universal, and should not be relied upon. The forward slash is the standard path separation character for Unix operating systems, which is why you see them in URLs like http://google.com. So, do not confuse the two contexts.
Forward slashes often seem to work in MSTS configuration files, and they also do not technically need enclosed in double-quotes, but it is still the wrong way to go about it.
Joseph
[Jovet]
http://www.elvastower.com/forums/ind...20#entry201880
Post# 24
Posted Today, 09:52 PM
James Ross "Backslashes must be doubled up because of support for escape codes (\n and \t). (Personally, I would only have expected this inside quoted strings, but OR does it outside as well.)"
View Postcr-stagg, on 29 April 2016 - 12:23 PM, said:
Also the question about 1 or 2 slashes. See this post by James Ross http://www.elvastowe...post__p__182993
James Ross "Backslashes must be doubled up because of support for escape codes (\n and \t). (Personally, I would only have expected this inside quoted strings, but OR does it outside as well.)"
The backslash ( \ ) is the correct path separation character for Microsoft Windows. This is a holdover from MS-DOS.
In "C" programming languages (e.g. C, C++, C#), the backslash is a special character in text string data. The backslash signals the start of an escape, which in these computer terms means a special embedded code to represent non-printable or non-textual data. The curious can read more about this here. What this means, though, is that a single backslash in a text string is invalid and makes no sense, sort of like dividing by zero. To actually have a backslash, its escape sequence must be used, which is two: \\
Escaped or continued (across multiple physical lines—this is common in .trk files) MSTS strings should always be double-quoted.
Adding to point #1, the forward slash ( / ) may be sometimes accepted as a substitute for a backslash in Windows paths, but this is not official nor universal, and should not be relied upon. The forward slash is the standard path separation character for Unix operating systems, which is why you see them in URLs like http://google.com. So, do not confuse the two contexts.
Forward slashes often seem to work in MSTS configuration files, and they also do not technically need enclosed in double-quotes, but it is still the wrong way to go about it.
Joseph
[Jovet]







Comment