Sleep in a cycle

Adam D Ruppe destructionator at gmail.com
Fri May 20 15:32:35 UTC 2022


On Friday, 20 May 2022 at 14:59:07 UTC, Alexander Zhirov wrote:
> I have a loop spinning, I want to pause in it in order to 
> repeat the next iteration. An error is displayed during 
> compilation.

The error has nothing to do with the sleep

> source/app.d(32,5): Warning: statement is not reachable
> Error: warnings are treated as errors
>        Use -wi if you wish to treat warnings only as 
> informational.


this is saying the stuff after your `while(true)` is never 
reached because it is an infinite loop.


More information about the Digitalmars-d-learn mailing list