caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: "r.3@libertysurf.fr" <r.3@libertysurf.fr>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] character syntax error '^M'
Date: Mon, 5 Aug 2013 17:38:27 +0000	[thread overview]
Message-ID: <F0CFD34B-4A2E-4A58-A3C3-257ECAE6376E@metastack.com> (raw)
In-Reply-To: <851017912.242111224.1375724069423.JavaMail.root@zimbra27-e5.priv.proxad.net>

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

Use \r or \x0d? http://caml.inria.fr/pub/docs/manual-ocaml/lex.html


David

On 5 Aug 2013, at 18:34, "r.3@libertysurf.fr<mailto:r.3@libertysurf.fr>" <r.3@libertysurf.fr<mailto:r.3@libertysurf.fr>> wrote:

Dear list,

I got a new error with trunk version of ocaml.

I have in a module a code that appears like that in emacs (which is used to convert files from dos to unix) :
String.get s (String.length s -1) = '^M'

The thing is that '^M' is actually the return character of windows (RET)

This works with ocaml 4.00, but now, with trunk version of ocaml, it tells me this is a "syntax error". How shall I do ? what is supposed to be inside the ' ' ?
The emacs command "describe-char" gives me this unicode : 0x0D


Best regards,
William

[-- Attachment #2: Type: text/html, Size: 2647 bytes --]

  reply	other threads:[~2013-08-05 17:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51ECF4EB.1060301@libertysurf.fr>
2013-07-22  9:07 ` [Caml-list] which ocaml build system r.3
2013-07-22 15:11   ` Ashish Agarwal
2013-07-23 13:39   ` Marek Kubica
2013-07-25 21:45     ` Martin DeMello
2013-07-26  1:10       ` Francois Berenger
2013-07-26  5:01         ` Malcolm Matalka
2013-07-26  5:46           ` Adrien Nader
2013-07-26  6:49             ` rixed
2013-07-26  7:07               ` David Allsopp
2013-07-26  4:49       ` Gabriel Scherer
2013-08-05 17:34         ` [Caml-list] character syntax error '^M' r.3
2013-08-05 17:38           ` David Allsopp [this message]
2013-08-05 20:23             ` William R
2013-08-06 10:52               ` David Allsopp
2013-07-27  9:51       ` [Caml-list] which ocaml build system Goswin von Brederlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F0CFD34B-4A2E-4A58-A3C3-257ECAE6376E@metastack.com \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=r.3@libertysurf.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).