__stdin.d(2): Error: found End of File when expecting }

2019-07-17 Thread Andre Pany via Digitalmars-d-learn
Hi, this scripts throws 2 times this error: __stdin.d(2): Error: found End of File when expecting } following compound statement __stdin.d(2): Error: found End of File when expecting } following compound statement ``` #!/bin/bash text=" import std; void main() { while

Re: __stdin.d(2): Error: found End of File when expecting }

2019-07-17 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jul 17, 2019 at 07:05:20PM +, Andre Pany via Digitalmars-d-learn wrote: > Hi, > > this scripts throws 2 times this error: > __stdin.d(2): Error: found End of File when expecting } following compound > statement > __stdin.d(2): Error: found End of File when exp

Re: __stdin.d(2): Error: found End of File when expecting }

2019-07-17 Thread ag0aep6g via Digitalmars-d-learn
On 17.07.19 21:05, Andre Pany wrote: ``` #!/bin/bash text=" import std; void main() {     while(true)     {     string enemy1 = readln().strip;     int dist1 = to!int(readln().strip);     string enemy2 = readln().strip;     int dist2 = to!int(readln().strip);     /

Re: __stdin.d(2): Error: found End of File when expecting }

2019-07-17 Thread Andre Pany via Digitalmars-d-learn
On Wednesday, 17 July 2019 at 20:02:51 UTC, ag0aep6g wrote: On 17.07.19 21:05, Andre Pany wrote: [...] Check out what `echo $text` prints: import std; void main() { while(true) { string enemy1 = readln().strip; int dist1 = to!int(readln().strip); string enemy2 = readln().strip; int di