Version française
Home     About     Download     Resources     Contact us    
Browse thread
invoke function from its name as string
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ludovic Coquelle <lcoquelle@g...>
Subject: invoke function from its name as string
First, hello everyone as it is my first message to this list ;)

I'm trying to solve this problem:
I have a module name and function name in string variables,
and I would like to call this function, like :
let mod = "MyMod" in
let fn = "my_fun" in
what_come_here mod fn

Can this problem be solved?
Was thinking that camlp4 could help ... not sure as it change the
syntax tree but I don't see how to get access to module name 'mod'.

Any pointer are greatly appreciated :)
thanks