I noticed that when I pass a string like this \[(tan(w)\] as a parameter to a function, the argument when printed in the function I passed it into is [(tan(w)]. Why would the slashes get stripped?
I noticed that when I pass a string like this \[(tan(w)\] as a parameter
Share
The slash in a string in any language whose syntax is inherited from C is used to escape other characters. For example if you want to put a double quote (
") in your string, you use\"To put a slash in a string, you have to put a double slash :
"\\[(tan(w)\\]"