Re: Sleep in a cycle

2022-05-22 Thread Alexander Zhirov via Digitalmars-d-learn
My schoolboy mistake. Thank you, [Adam](https://forum.dlang.org/post/mbbampewwcrkkltjl...@forum.dlang.org)! On Saturday, 21 May 2022 at 11:17:04 UTC, Alain De Vos wrote: Or you could capture a sigint and close the file then. Yes, exactly, I was thinking in this direction. Probably not quite

Re: Sleep in a cycle

2022-05-21 Thread Alain De Vos via Digitalmars-d-learn
Or you could capture a sigint and close the file then.

Re: Sleep in a cycle

2022-05-20 Thread Ali Çehreli via Digitalmars-d-learn
On 5/20/22 07:59, 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. > > ```d > while (true) > { We are in an unconditional loop which is also infinite. > } But you have code

Re: Sleep in a cycle

2022-05-20 Thread Adam D Ruppe via Digitalmars-d-learn
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

Sleep in a cycle

2022-05-20 Thread Alexander Zhirov via Digitalmars-d-learn
I have a loop spinning, I want to pause in it in order to repeat the next iteration. An error is displayed during compilation. ```d import std.stdio; import modules.monitors; //my module import core.thread; int main(string[] args) { string path = "mswitch.log"; if (args.length > 1)