caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goulagman <goulagman@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] color on linux terminal
Date: Sat, 13 Jan 2007 21:56:59 +0100	[thread overview]
Message-ID: <19eebd060701131256k71e98475o7e79ac5160afcf9c@mail.gmail.com> (raw)
In-Reply-To: <slrneqig8s.8ek.mweihs@localhost.localdomain>

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

On 13/01/07, Markus Weihs <mweihs@gmx.at> wrote:
>
> Hi,
>
> to get coloured output on a linux terminal, you can do something like
>
>     echo -e "\033[31m This is now red"
>
> How can I do this with OCaml? The following doesn't work
>
>     print_string "\033[31m blabla"


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

Thanks in advance,
>
> Markus
>
>

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

  parent reply	other threads:[~2007-01-13 20:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-13 20:29 Markus Weihs
2007-01-13 20:52 ` [Caml-list] " Daniel de Rauglaudre
2007-01-13 21:05   ` Markus Weihs
2007-01-13 20:53 ` [Caml-list] " Vu Ngoc San
2007-01-13 20:56 ` Eric Cooper
2007-01-16 18:23   ` Florian Weimer
2007-01-21 17:11   ` Xavier Leroy
2007-01-13 20:56 ` Goulagman [this message]
2007-01-13 21:38   ` Philippe Wang
2007-01-13 22:45 ` Christophe TROESTLER

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=19eebd060701131256k71e98475o7e79ac5160afcf9c@mail.gmail.com \
    --to=goulagman@gmail.com \
    --cc=caml-list@inria.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).