Forum Navigation
passing a parm to a function/method/delegate
Posted: 03/30/09 09:53:15Hi all, I'm taking my first D/Tango steps, unfortunatly I have two left feet. Thing are not going so well as I hoped. I do have problems with the OO lingo in particular. In the code below I want to use SERVERDOC inside the run method/delegate/function but I can not for my life figure out how I should pass it to run. (The code is an abbrevated extract pointing out my problem only.)
Any help highly appreciated :|
void main(){ auto serverxml = cast(char[])File.get("serverparms.xml"); auto SERVERDOC = new Document!(char); serverdoc.parse(serverxml); void run(){ auto dwxml = readDwXml ("lasse", SERVERDOC); } } // start server in a separate thread, and wait for it to start (new Thread (&run)).start(); ...