We're long overdue for a "D is awesome" post
H. S. Teoh
hsteoh at qfbox.info
Wed May 31 00:36:57 UTC 2023
On Wed, May 31, 2023 at 12:28:40AM +0000, Salih Dincer via Digitalmars-d wrote:
[...]
> I didn't know that `while` is used just like `foreach`. 0k4y, we can
> use `auto` in `while` condition or `if`, which lives in the same block
> as `auto`.
>
> ```d
> while (line; outputTemplate.byLine) {...}
> ```
>
> Does the following really work, thanks?
Oops, that's supposed to be `foreach`, not `while`. :-/ My bad.
T
--
Trying to define yourself is like trying to bite your own teeth. -- Alan Watts
More information about the Digitalmars-d
mailing list