forward variadic arguments

Daniel Keep daniel.keep.lists at gmail.com
Fri Jun 16 00:17:39 PDT 2006



Tom S wrote:
> Frank Benoit wrote:
>>  void execSql( char[] aSql, ... ){
>>   char[] sql = std.string.format( aSql, _arguments, _argptr );
>>   database.exec( sql );
>>  }
>>
>> The forwarding of all arguments to format() seams not to work.
>> how can I do this?
> 
> I know it's evil and stuff, but I had to do this :D
> 
> [snip evil but quite handy code]
> 

One of the projects I've been thinking about doing is writing a library
for doing programmatic function calls, which would allow things like
this to actually be portable :P

Of course, I've been putting it off since Walter still hasn't documented
the calling convention for D, and I didn't even realize until a month or
so ago that it (sometimes) passes an argument in EAX >_<

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d-learn mailing list