is there a way to pause a program and resume with just a key press (or enter key)
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 14 21:23:54 PDT 2014
On Tue, Jul 15, 2014 at 02:49:55AM +0000, WhatMeWorry via Digitalmars-d-learn wrote:
> Sorry if this is an incredibly naive question.
>
> I prefer to pragmatically pause my programs periodically so that I can
> peruse output statements. Ideally, I'd like to continue by just hitting any
> old key. My feeble attempt below requires I enter at least one character and
> then the enter key.
>
> char ignore;
> writeln("Enter to continue");
> readf(" %s", &ignore);
>
> Is there a way to continue with any old key press? or just the enter key?
[...]
I don't know about Windows, but on Linux, you can just press ctrl-s and
ctrl-q to pause/resume the console. (This is a Linux terminal function,
not specific to D.)
T
--
Ruby is essentially Perl minus Wall.
More information about the Digitalmars-d-learn
mailing list