www.digitalmars.com         C & C++   DMDScript  

D - Explain inout, please?

reply Russ Lewis <spamhole-2001-07-16 deming-os.org> writes:
The Villagers are Online! villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]
Mar 21 2002
next sibling parent "Walter" <walter digitalmars.com> writes:
inout's are parameters passed by reference. They must already be set to a
value when calling the function, and the called function may set them to a
different value.
Mar 21 2002
prev sibling parent "Pavel Minayev" <evilone omen.ru> writes:
out parameters are reset to their default value at the beginning
of the function, so you cannot pass data by them (and thus, you
can pass uninitialized variables). inout states that value of
the variable should be known to function, so it is not erased,
and uninitialized variables cannot be passed.
Mar 21 2002