Thread overview | |||||
---|---|---|---|---|---|
|
March 21, 2002 Explain inout, please? | ||||
---|---|---|---|---|
| ||||
-- 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))) ] |
March 21, 2002 Re: Explain inout, please? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | 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. |
March 22, 2002 Re: Explain inout, please? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | 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. |
Copyright © 1999-2021 by the D Language Foundation