Re: User input; quick question.

2017-04-29 Thread fred via Digitalmars-d-learn
On Saturday, 29 April 2017 at 21:18:27 UTC, cym13 wrote: On Saturday, 29 April 2017 at 21:09:13 UTC, fred wrote: import std.stdio; I am somewhat new to D, and I am trying to receive user input, like this, with a prompt: string str; writeln("Enter a string: "); str = readln; writeln(str);

Re: User input; quick question.

2017-04-29 Thread cym13 via Digitalmars-d-learn
On Saturday, 29 April 2017 at 21:09:13 UTC, fred wrote: import std.stdio; I am somewhat new to D, and I am trying to receive user input, like this, with a prompt: string str; writeln("Enter a string: "); str = readln; writeln(str); However, the prompt appears after I enter the input; any

User input; quick question.

2017-04-29 Thread fred via Digitalmars-d-learn
import std.stdio; I am somewhat new to D, and I am trying to receive user input, like this, with a prompt: string str; writeln("Enter a string: "); str = readln; writeln(str); However, the prompt appears after I enter the input; any reason why? I've trawled the internet for a good hour,