no property 'opCall' for type ... what am I doing wrong?
Daniel Keep
daniel.keep.lists at gmail.com
Sat May 5 01:34:33 PDT 2007
Frits van Bommel wrote:
> Daniel Keep wrote:
>> Just keep in mind that you can't take the address of a function
>> argument, so if you do this inside a function, you have to make a copy
>> first.
>
> I'm surprised by this statement, and can't find a mention of it in the
> spec.
> Do you have a reference for it?
I don't know if it's in the spec (I can't remember ever running across
it), but I know it doesn't work.
The problem is that the D calling convention allows for up to one
argument to be passed using registers, which don't *have* an address, so
taking the address of them doesn't always make sense.
In any case, I know the compiler has barfed every time I've tried to do
it...
-- Daniel
--
int getRandomNumber()
{
return 4; // chosen by fair dice roll.
// guaranteed to be random.
}
http://xkcd.com/
v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
More information about the Digitalmars-d-learn
mailing list