Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at ocaml.org.

Browse thread
Meta-programming?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-10 (06:29)
From: stalkern2 <stalkern2@t...>
Subject: Meta-programming?
Hello to everybody I'm wondering whether in Ocaml one can roll up a 
string:string and then use a command that takes that string as a command, 
something like: interpret_this = fun s:string -> commands.
Actually, I'm using configuration files where everything is a string, and I'd 
like to turn them into initializations for a program. If I had only a few 
initializations, I could manage them one by one, but when they are many, I'd 
rather have a program reading them. The point is, in a configuration file the 
name of a variable is a "name", i.e. a string. Well, I can't say in my 
program 
let "varName" = value,
I have to say 
let varName = value.

So I thought that maybe it is possible to say 
some_meta-command "let varName = value".

Any idea?

Thanks 
Ernesto