Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Printing text with holes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Karl Zilles <zilles@1...>
Subject: Re: [Caml-list] Printing text with holes
Martin Jambon wrote:
> Hello,
> 
> I am curious to know what people use to print long text written in a
> natural language, and containing many holes, like dynamically generated
> web pages.
> 

I just used HereDoc to create a set of web pages, and found it pleasant 
to work in.

I used his old codebase, instead of the alpha version, since it looks 
like the alpha version hasn't been touched in 2 years.

http://www.eleves.ens.fr/home/frisch/soft.html#HereDoc

He has a syntax like yours:

<< Hello, $firstname $lastname. >>

or

<< I am $$ string_of_int age $$ years old >>

He doesn't appear to have any syntactic sugar for conversions.  Which 
wasn't a problem.

He has constructs for creating loops, and the ability to include 
templates from other files.

He's also abstracted out the printing so that you can tell it where you 
want to send the generated text.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners