www.digitalmars.com         C & C++   DMDScript  

D - Out parameter to functions

reply j.zuk cetelembank.de writes:
The 'out' parameters in functions beheve like 'inout' .
They should be inittialized with default value. 
am I right ?
Jun 04 2002
parent reply "Walter" <walter digitalmars.com> writes:
<j.zuk cetelembank.de> wrote in message
news:adi1bd$m80$1 digitaldaemon.com...
 The 'out' parameters in functions beheve like 'inout' .
 They should be inittialized with default value.
 am I right ?
Out parameters should be initialized by the callee, inout by the caller.
Jun 04 2002
parent reply "Sean L. Palmer" <seanpalmer earthlink.net> writes:
I don't believe you answered his question.  Does D automatically default
initialize out parameters inside the callee (first thing during frame
setup)?

Sean

"Walter" <walter digitalmars.com> wrote in message
news:adj060$1l9d$1 digitaldaemon.com...
 <j.zuk cetelembank.de> wrote in message
 news:adi1bd$m80$1 digitaldaemon.com...
 The 'out' parameters in functions beheve like 'inout' .
 They should be inittialized with default value.
 am I right ?
Out parameters should be initialized by the callee, inout by the caller.
Jun 05 2002
parent "Walter" <walter digitalmars.com> writes:
If it doesn't, it's a bug!

"Sean L. Palmer" <seanpalmer earthlink.net> wrote in message
news:adki60$65k$1 digitaldaemon.com...
 I don't believe you answered his question.  Does D automatically default
 initialize out parameters inside the callee (first thing during frame
 setup)?

 Sean

 "Walter" <walter digitalmars.com> wrote in message
 news:adj060$1l9d$1 digitaldaemon.com...
 <j.zuk cetelembank.de> wrote in message
 news:adi1bd$m80$1 digitaldaemon.com...
 The 'out' parameters in functions beheve like 'inout' .
 They should be inittialized with default value.
 am I right ?
Out parameters should be initialized by the callee, inout by the caller.
Jun 05 2002