Meaning of in, out and inout
Steven Schveighoffer
schveiguy at gmail.com
Thu Jan 20 20:45:08 UTC 2022
On 1/20/22 8:28 AM, Paul Backus wrote:
>
> The explanation you quoted is from 2005, and `inout` does not mean the
> same thing in 2022 as it did in 2005.
>
> The current meaning of inout is explained in the D language
> specification on dlang.org. Here is a link to the relevant section:
>
> https://dlang.org/spec/function.html#inout-functions
Note that in 2005, D2 did not exist, `inout` in D1 used to mean what
`ref` now means in D2.
So if you are looking for that specific meaning, use `ref`.
-Steve
More information about the Digitalmars-d-learn
mailing list