From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA14893; Sat, 13 Sep 2003 12:44:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA07023 for ; Sat, 13 Sep 2003 12:44:50 +0200 (MET DST) Received: from pengo.systems.pipex.net (pengo.systems.pipex.net [62.241.160.193]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8DAinf07582 for ; Sat, 13 Sep 2003 12:44:49 +0200 (MET DST) Received: from draco (81-86-132-151.dsl.pipex.com [81.86.132.151]) by pengo.systems.pipex.net (Postfix) with ESMTP id 7F2B54C0035E for ; Sat, 13 Sep 2003 11:44:48 +0100 (BST) Received: from jim by draco with local (Exim 3.36 #1 (Debian)) id 19y7ua-0003ZR-00 for ; Sat, 13 Sep 2003 11:45:52 +0100 Date: Sat, 13 Sep 2003 11:45:52 +0100 From: Jim Farrand To: caml-list@inria.fr Subject: [Caml-list] O'Caml looks at the contents of comments?! Message-ID: <20030913104552.GA21760@farrand.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline X-Uptime: 20:00:41 up 2 days, 7:18, 2 users, load average: 0.18, 0.46, 0.48 X-Spam-Info: http://farrand.net/home-spamfilter.shtml User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; farrand:01 farrand:01 camlp:01 commenting:01 ignores:01 enforced:01 camlp:01 delivers:99 compiler:01 sci:01 behaviour:01 preprocessor:02 syntax:02 o'caml:02 address:96 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've spent a long time puzzling over a "string not terminated" error which was being reported inside a class I'm writing. Camlp4r reported the error just as being somewhere in the class (i.e. Line 267 character 4 - 1076) which gave me quite a bit of code to look over. I spent a long while staring at the code quite puzzled because I couldn't see an unterminated string anywhere. Eventually I started commenting out bits of code, and I was even more confused when I'd commented out the entire class and STILL got the error. Eventually I traced the error to an unterminated string inside a comment. This strikes me as slightly odd behaviour - one of the first things comp sci students are taught about comments is that the compiler ignores them. As this has been my experience for many years it took me a long time to even consider that I could have a syntax error inside a comment. So why is this restriction enforced? To be fair, it seems that the when compiling without the camlp4 preprocessor, the error message points out the problem very clearly, and so it wouln't stump people like it did me, and obviously I won't ever be confused by it again, now I know. STill I'm curious about why this should be an error. Regards, Jim -- Jim Farrand -- NB: I have a spam-filter on my e-mail account. The first time you e-mail me you may be asked to confirm your e-mail address before the system delivers your mail. http://farrand.net/home-spamfilter.shtml ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners