Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why backslash as escape character instead of a less-used character? [closed]

In C/C++ (and other languages) the escape character is a backslash. But the backslash is popular (in paths/regexes). Why is not a less popular character, such as a tilde (~) or expononent (^) used?

like image 941
MustafaM Avatar asked Feb 22 '23 12:02

MustafaM


1 Answers

The question should be the other way around: why was the backslash, which until the early 1980s was mainly used for escape characters, chosen as a path separator in MS-DOS? See this blog post for the answer.

like image 63
Fred Foo Avatar answered Mar 30 '23 01:03

Fred Foo