From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 400A682098 for ; Mon, 5 Aug 2013 22:23:26 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of r.3@libertysurf.fr) identity=pra; client-ip=212.27.42.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="r.3@libertysurf.fr"; x-sender="r.3@libertysurf.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of r.3@libertysurf.fr) identity=mailfrom; client-ip=212.27.42.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="r.3@libertysurf.fr"; x-sender="r.3@libertysurf.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp3-g21.free.fr) identity=helo; client-ip=212.27.42.3; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="r.3@libertysurf.fr"; x-sender="postmaster@smtp3-g21.free.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgBAEEJAFLUGyoDlGdsb2JhbABbgkIjVok9tgiBIRYOAQEBAQcNEhQDJYIkAQEFeAEQCw4KCRYIBwkDAgECATQRBg0BBQIBAYgNAwi1N5AZB4QNA5kKkz4 X-IPAS-Result: AmgBAEEJAFLUGyoDlGdsb2JhbABbgkIjVok9tgiBIRYOAQEBAQcNEhQDJYIkAQEFeAEQCw4KCRYIBwkDAgECATQRBg0BBQIBAYgNAwi1N5AZB4QNA5kKkz4 X-IronPort-AV: E=Sophos;i="4.89,820,1367964000"; d="scan'208,217";a="28569613" Received: from smtp3-g21.free.fr ([212.27.42.3]) by mail2-smtp-roc.national.inria.fr with ESMTP; 05 Aug 2013 22:23:24 +0200 Received: from [IPv6:2a01:e35:2ecd:7540:a508:189d:b135:6157] (unknown [IPv6:2a01:e35:2ecd:7540:a508:189d:b135:6157]) by smtp3-g21.free.fr (Postfix) with ESMTP id 9B05BA61E3; Mon, 5 Aug 2013 22:23:20 +0200 (CEST) Message-ID: <520009B7.8040307@libertysurf.fr> Date: Mon, 05 Aug 2013 22:23:19 +0200 From: William R User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: David Allsopp CC: "caml-list@inria.fr" References: ,<851017912.242111224.1375724069423.JavaMail.root@zimbra27-e5.priv.proxad.net> In-Reply-To: Content-Type: multipart/alternative; boundary="------------090603090203070608000700" Subject: Re: [Caml-list] character syntax error '^M' This is a multi-part message in MIME format. --------------090603090203070608000700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit perfect, thanks a lot! On 08/05/2013 07:38 PM, David Allsopp wrote: > 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 > " > 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 --------------090603090203070608000700 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
perfect, thanks a lot!

On 08/05/2013 07:38 PM, David Allsopp wrote:


David

On 5 Aug 2013, at 18:34, "r.3@libertysurf.fr" <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

--------------090603090203070608000700--