From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 4E70FBC0A for ; Sat, 13 Jan 2007 22:38:43 +0100 (CET) Received: from 26.mail-out.ovh.net (26.mail-out.ovh.net [213.186.42.179]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l0DLcgaX027925 for ; Sat, 13 Jan 2007 22:38:43 +0100 Received: (qmail 19480 invoked by uid 503); 13 Jan 2007 21:38:44 -0000 Received: (QMFILT: 1.0); 13 Jan 2007 21:38:44 -0000 Received: from b6.ovh.net (HELO mail147.ha.ovh.net) (213.186.33.56) by 26.mail-out.ovh.net with SMTP; 13 Jan 2007 21:38:44 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 13 Jan 2007 21:38:33 -0000 Received: from vil93-4-82-227-140-227.fbx.proxad.net (HELO ?82.227.140.227?) (lists%philippewang.info@82.227.140.227) by ns0.ovh.net with SMTP; 13 Jan 2007 21:38:31 -0000 In-Reply-To: <19eebd060701131256k71e98475o7e79ac5160afcf9c@mail.gmail.com> References: <19eebd060701131256k71e98475o7e79ac5160afcf9c@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <07563622-8767-458A-8A8F-095E5863AD1C@philippewang.info> Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit From: Philippe Wang Subject: Re: [Caml-list] color on linux terminal Date: Sat, 13 Jan 2007 22:38:23 +0100 To: Goulagman X-Mailer: Apple Mail (2.752.3) X-Ovh-Remote: 82.227.140.227 (vil93-4-82-227-140-227.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Miltered: at concorde with ID 45A95162.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 blabla:01 backslash:01 027:98 wrote:01 caml-list:01 color:97 string:02 string:02 guess:04 character:04 character:04 terminal:04 meant:06 linux:06 On 13 janv. 07, at 21:56, Goulagman wrote: > It's because, for Ocaml, the escape sequence \0xx matches the > ASCII character xx in decimal, not in octal. > > print_string "\027[31m blabla" works fine > Well, what you said is true, still it's not meant to be explained like this ! (well I guess and hope so) The backslash in a character or string sequence introduces a decimal number between 0 and 255 with *exactly* 3 digits. You can also write special characters in hexadecimal : "\xFF" = "\255" ;-)