references and function calls

Daniel Keep daniel.keep.lists at gmail.com
Fri Mar 16 04:49:10 PDT 2007



Neal Becker wrote:
> I've been reading the D specification.  A couple of questions:
> 1. Do I understand correctly that D has no reference type declarations
> (there is no e.b., int& x;)?

That's correct.

> 2. Reading the section on functions, unfortunately I don't think it is clear
> on how arguments are passed.  Do I understand correctly that argument
> passing is like java: POD are passed by value but other objects (class
> instances) are passed by reference?

That's also correct.

	-- 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