caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Ocaml 3.07+2: "Illegal backslash escape in string"
@ 2004-03-10 14:54 Oliver Bandel
  2004-03-10 15:22 ` Florian Hars
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Bandel @ 2004-03-10 14:54 UTC (permalink / raw)
  To: caml-list

Hello,


after recompiling code that has run under Ocaml 3.04 (??)
without warnings, using Str-module, I now got those messages,
as you can see in the Subject-Line.

That's, when I use something like

   Str.regexp = "a\|b"

instead of

   Str.regexp = "a\\|b"


Why should I use a double-backslashed sequence?
When looking into the manual, the first way is
correct.

Will this be fixed, or will this double-backslashed sequence
the new way how to use Str-regexp-Definitions?!


Ciao,
   Oliver

-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Ocaml 3.07+2: "Illegal backslash escape in string"
  2004-03-10 14:54 [Caml-list] Ocaml 3.07+2: "Illegal backslash escape in string" Oliver Bandel
@ 2004-03-10 15:22 ` Florian Hars
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Hars @ 2004-03-10 15:22 UTC (permalink / raw)
  To: Oliver Bandel; +Cc: caml-list

Oliver Bandel wrote:
> Why should I use a double-backslashed sequence?

Because it is correct, as is clearly (if you like *that* kind of clarity) 
documented in an obscure part of the manual (in section 6.1).

The implementation of string literals was fixed in 3.05 to actually follow the 
documented behaviour.

Yours, Florian.

-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-10 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-10 14:54 [Caml-list] Ocaml 3.07+2: "Illegal backslash escape in string" Oliver Bandel
2004-03-10 15:22 ` Florian Hars

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).