Version française
Home     About     Download     Resources     Contact us    
Browse thread
Concatenation of static strings?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] Concatenation of static strings?
David Allsopp wrote:

> I don't know whether the compiler optimises the concatenation (it ought to,
> just as constant integer arithmetic ought to be evaluated by the compiler),
> but how about writing:
> 
>     let print_usage () =
>         print_endline "\n\
>                        Usage : progname [options]\n\
>                       \        progname [options] <config file>"
> 
> Which is less typing.

Ah, thats much nicer. Thanks.

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"C++ : Where friends have access to your private members."
-- Gavin Russell Baker