Breaking ";" rule with lambda functions
gassa at mail.ru
Mon Aug 1 21:35:19 UTC 2022
On Monday, 1 August 2022 at 20:36:12 UTC, pascal111 wrote:
> My complaint is about that a function is not a same as an
> expression that functions return values, but expressions being
> evaluated to provide values.
With a ternary expression, we write:
`x = (cond ? a : b);`
The traditional look of it is:
`if (cond) x = a; else x = b;`
Note how we have a semicolon after `x = a` in the latter form,
but can't have it in the former.
More information about the Digitalmars-d-learn