How to pause terminal in D on Linux?

lqjglkqjsg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 25 05:13:54 PDT 2016


On Sunday, 24 July 2016 at 00:54:21 UTC, Zekereth wrote:
> On Saturday, 23 July 2016 at 19:08:00 UTC, WhatMeWorry wrote:
>> What I thought would be trivial is becoming a nightmare. Can 
>> anybody set me straight.  Thanks in advance.
>>
>> [...]
>
> Use the getchar() function.
>
> void pause(const string msg = "Press enter/return to 
> continue...")
> {
> 	write(msg);
> 	getchar();
> }

just call std.stdio.stdin.read() and ignore the result...


More information about the Digitalmars-d-learn mailing list