stdin/stdout and flush

a11e99z black80 at bk.ru
Tue Aug 27 21:28:05 UTC 2019


On Tuesday, 27 August 2019 at 21:01:58 UTC, Andre Pany wrote:
> On Tuesday, 27 August 2019 at 20:45:44 UTC, a11e99z wrote:
>> On Tuesday, 27 August 2019 at 20:09:34 UTC, Andre Pany wrote:

what result u expecting?

u send from "b": e1 10 e2 9
"a" read it. 1st loop finished.
then u send from "b" p.stdout.readln(); that is read as 2nd 
enemy1=null
and finally sleep and exit from b.main where pipe is closed and 
"a" read null again (no data)
dist1 = null.to!int => error




More information about the Digitalmars-d-learn mailing list