Logo Questions Linux Laravel Mysql Ubuntu Git Menu

Why are there two slashes - forward and backward? [closed]

I'm totally confused which one to use and when, first thing I do when something goes wrong in code with a slash is replace the one with other so my test cases double with one for / and one for \ .Help me to get the logic behind slashes.

like image 350
Passionate programmer Avatar asked Jun 17 '10 05:06

Passionate programmer

1 Answers

From the wikipedia article about the backslash:

Bob Bemer introduced the \ character into ASCII, on September 18, 1961, as the result of character frequency studies. In particular the \ was introduced so that the ALGOL boolean operators "∧" (AND) and "∨" (OR) could be composed in ASCII as "/\" and "/" respectively.[4] Both these operators were included in early versions of the C programming language supplied with Unix V6 , Unix V7 and more currently BSD 2.11.

like image 153
Wim Coenen Avatar answered Sep 24 '22 06:09

Wim Coenen