basic interactive readf from stdin

Karthikeyan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 26 18:17:47 PST 2015


On Sunday, 27 December 2015 at 02:08:05 UTC, Ali Çehreli wrote:
> On 12/26/2015 05:15 PM, Karthikeyan wrote:
>
> >> The answer is nine chapters later. :) (Use readln() and
> strip() (or
> >> chomp())).
> >>
> >>   http://ddili.org/ders/d.en/strings.html
> >>
> >> Ali
> >
> > Many thanks Ali. The book says ctrl + D to end input. But I
> used two
> > enters to get the output. Any idea why?
>
> I guess that means that my understanding was not portable. It 
> requires Ctrl-D on my console environment on Linux. No matter 
> how many Enters I enter :p they become parts of the same string.
>
> Ali

:) I was on zsh with gnome terminal alike on Linux Mint 15. 
Thanks for clearing that up.



More information about the Digitalmars-d-learn mailing list