3 ms·
When I had a some class with Prolog, we copied some code from the lecture notes. The problem was that it wouldn't run, even though we had looked over it dozens
by Dewie 14y ago
When I had a some class with Prolog, we copied some code from the lecture notes. The problem was that it wouldn't run, even though we had looked over it dozens of times and it was syntactically correct. Turns out that there was a string that was enclosed in quotes, but a different kind of quotation mark than what Prolog was using for strings. So the string was not syntax highlighted, and we noticed that if we deleted the quotes and typed in the quotes manually with the keyboard, those quotes had a font that was a little bit different.
I think the problem was that he had written it on a Mac, and we were using Windows/Linux.
- pavel_lishin 14y agoIsn't it more likely that something like Microsoft word replaced plain ol' quotes with their "smart quotes"?
- Dewie 13y agoWe were using a text editor (notepad++ if it was Windows), and it would be pretty invading for a very basic text editor to change text like that (copy pasted at that). But honestly I don't know what these "smart quotes" are so it might as well be it. The only time that text encoding causes trouble is when I get something from someone who has written it on a Mac, whether it is the obscure quotation marks or a lot of gunk when copy pasting from PDFs.