Re: D program code

2013-11-13 Thread Vladimir Panteleev
On Wednesday, 13 November 2013 at 21:31:51 UTC, Andrei Alexandrescu wrote: Yah. That reminds me - the source tree should be in our github... What about the kitchen-sink library it currently depends on? What I'd love to do is get going with http://wiki.dlang.org/Event_system and port DFeed to

Re: D program code

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 1:15 PM, Vladimir Panteleev wrote: On Wednesday, 13 November 2013 at 20:33:05 UTC, Andrei Alexandrescu wrote: On 11/13/13 10:47 AM, Adam D. Ruppe wrote: On Wednesday, 13 November 2013 at 18:39:59 UTC, bachmeier wrote: This wouldn't happen so often if digitalmars.D.learn appeared at

Re: D program code

2013-11-13 Thread Adam D. Ruppe
On Wednesday, 13 November 2013 at 21:15:32 UTC, Vladimir Panteleev wrote: Is it better now? rox!

Re: D program code

2013-11-13 Thread Vladimir Panteleev
On Wednesday, 13 November 2013 at 20:33:05 UTC, Andrei Alexandrescu wrote: On 11/13/13 10:47 AM, Adam D. Ruppe wrote: On Wednesday, 13 November 2013 at 18:39:59 UTC, bachmeier wrote: This wouldn't happen so often if digitalmars.D.learn appeared at the top of the page. amen, it is so far down

Re: D program code

2013-11-13 Thread Andrei Alexandrescu
On 11/13/13 10:47 AM, Adam D. Ruppe wrote: On Wednesday, 13 November 2013 at 18:39:59 UTC, bachmeier wrote: This wouldn't happen so often if digitalmars.D.learn appeared at the top of the page. amen, it is so far down that sometimes i forget about it! bugzillize and pullrequestize! Andrei

Re: D program code

2013-11-13 Thread Adam D. Ruppe
On Wednesday, 13 November 2013 at 18:39:59 UTC, bachmeier wrote: This wouldn't happen so often if digitalmars.D.learn appeared at the top of the page. amen, it is so far down that sometimes i forget about it!

Re: D program code

2013-11-13 Thread bachmeier
On Wednesday, 13 November 2013 at 14:45:52 UTC, John Colvin wrote: On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote: import std.stdio,std.cstream; void main(string[] args) { int first; int second; write ("First Number : "); readf (" %s",

Re: D program code

2013-11-13 Thread Vincent
Sorry sir my post is out of place. But thanks anyway next time I know now where will I post my topic/questions. Thanks for the help sirs...

Re: D program code

2013-11-13 Thread John Colvin
On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote: import std.stdio,std.cstream; void main(string[] args) { int first; int second; write ("First Number : "); readf (" %s", &first); write ("Second Number: "); re

Re: D program code

2013-11-13 Thread Dejan Lekic
Problem: When I run this code why it is automatically exit when it shows the result. It allows me to input first numbers and second number but when it shows the result it will totally exit and I can't see the output. I use D-IDE as my editor and dmd2 as my compiler. Add t

Re: D program code

2013-11-13 Thread Dicebot
Changing readf (" %s", &second); to readf (" %s ", &second); is likely to fix it (untested). There is a "\n" symbol left in buffer from last entry (which gets read by `getc`)

Re: D program code

2013-11-13 Thread Jacob Carlborg
On 2013-11-13 15:36, Vincent wrote: Problem: When I run this code why it is automatically exit when it shows the result. It allows me to input first numbers and second number but when it shows the result it will totally exit and I can't see the output. I use D-IDE as my edit

Re: D program code

2013-11-13 Thread Adam D. Ruppe
On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote: it shows the result it will totally exit and I can't see the output. din.getc has something in its buffer already (the newline from when you hit enter after readf - it uses the number but left the line), so it doesn't hav

D program code

2013-11-13 Thread Vincent
import std.stdio,std.cstream; void main(string[] args) { int first; int second; write ("First Number : "); readf (" %s", &first); write ("Second Number: "); readf (" %s", &second); int result = first + seco