Version française
Home     About     Download     Resources     Contact us    
Browse thread
Strings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Hars <hars@b...>
Subject: Re: [Caml-list] Strings
Martin Jambon wrote:
> - There is nothing to change in OCaml's string type because it is an "array of
> bytes", with type char representing single bytes.

$ ocaml
         Objective Caml version 3.10.2

# let c = 'ö';;
Characters 8-9:
   let c = 'ö';;
           ^
Syntax error
#

Meanwhile, in another terminal window:

$ ocaml
         Objective Caml version 3.10.2

# let c  = 'ö';;
val c : char = '\246'
#

I prefer my strings to be composed of chars that represent characters.

- Florian.