converting a string function name to an actual function call

Robert Fraser fraserofthenight at gmail.com
Tue Nov 27 14:01:00 PST 2007


Steven Schveighoffer wrote:
> "oliver" wrote
>> Hi everyone,
>>
>> is it possible to program kind of a general function that applies the name 
>> of a function (given as a char [] ) to arguments. The following code does 
>> not work but something in the same spirit.
> 
> As far as I know, this is not possible.  D does not currently support 
> runtime reflection, which is required by this type of function.  Only 
> compile-time reflection is possible.
> 
> -Steve 
> 
> 

Flectioned can do it:

http://flectioned.kuehne.cn/

of course, it's a hack/workaround rather than a language feature, but it 
works (on Win32 it only works if you compile with debug info).


More information about the Digitalmars-d-learn mailing list