Explain function syntax
H. S. Teoh
hsteoh at qfbox.info
Thu Sep 18 00:44:49 UTC 2025
On Wed, Sep 17, 2025 at 10:16:50PM +0000, Brother Bill via Digitalmars-d-learn wrote:
> In the following from Programming in D, page 483, we use function keyword.
>
> I expect that the first int in
> ```
> int function(int);
> ```
>
> represents the return value.
>
> What does the second (int) refer to?
[...]
The type of the first (and in this case, only) parameter.
T
--
Being in debt attracts a lot of interest from banks.
More information about the Digitalmars-d-learn
mailing list