Question

I was trying to execute a few lines of code from a file using 'use' command but I'm getting error which I don't understand,

StdIn:1.6-1.10 Error unclosed string

Screen Shot

I search everywhere, trying to find what does that error mean but now luck,

Please help

Was it helpful?

Solution

"Unclosed string" means that you've started a string using ", but you did not close it using another ".

So why do you get that error in your case - clearly you do have the proper amount of "s there? Well, if we look at the column numbers, we see that the error complains about the section starting at the first " and ending at the h after the backslash, meaning it expected the string to end there.

So basically what the error message is telling you is that it is not expecting an h there. Why not? Because it was preceded by a backslash, backslashes in strings start escape sequences and \h is not a valid escape sequence. So you need to replace your backslashes with double backslashes (or single forward slashes) to escape them and that should fix the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top