On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
Hello i'm kinda new to D language and i wanted to make a simple
program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
One way would be:
import std.stdio;
int x;
On Sunday, 30 April 2017 at 05:53:09 UTC, Andrew Edwards wrote:
string line;
parse!int((line = readln)).writeln;
is there a reason you mix normal call and ufc or just some style?
you can do this and remove some ()
(line = readln).parse!int.writeln;
On Sunday, 30 April 2017 at 03:20:20 UTC, JV wrote:
On Sunday, 30 April 2017 at 03:18:04 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
btw i forgot to add () at readln while editing the post
That's not necessary, it doesn't change anything.
But readln without
On Sunday, 30 April 2017 at 03:18:39 UTC, JV wrote:
On Sunday, 30 April 2017 at 03:13:14 UTC, JV wrote:
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
int func;
writeln("\t\tEnter Selection : ");
readln(func);
On Sunday, 30 April 2017 at 03:20:20 UTC, JV wrote:
On Sunday, 30 April 2017 at 03:18:04 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
okay?? but how do i return an int?
tried using what i found in the internet like using std.conv;
to use toInt() but still sh
On Sunday, 30 April 2017 at 03:18:04 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
btw i forgot to add () at readln while editing the post
That's not necessary, it doesn't change anything.
But readln without arguments returns a string, not an int.
okay?? but
On Sunday, 30 April 2017 at 03:13:14 UTC, JV wrote:
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
Hello i'm kinda new to D language and i wanted to make a
simple program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
bt
On Sunday, 30 April 2017 at 03:10:25 UTC, JV wrote:
btw i forgot to add () at readln while editing the post
That's not necessary, it doesn't change anything.
But readln without arguments returns a string, not an int.
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
Hello i'm kinda new to D language and i wanted to make a simple
program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
btw here is my sample code
int func;
writeln("
On Sunday, 30 April 2017 at 03:04:49 UTC, Adam D. Ruppe wrote:
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
int func;
writeln("\t\tEnter Selection : ");
func = readln;
writeln(func);
That shouldn't even compile... are you sure that's your actual
code, and that it is actuall
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote:
int func;
writeln("\t\tEnter Selection : ");
func = readln;
writeln(func);
That shouldn't even compile... are you sure that's your actual
code, and that it is actually building successfully?
Hello i'm kinda new to D language and i wanted to make a simple
program
but somehow my input does no go to my if statements and just
continues to ask for the user to input.Kindly help me
btw here is my sample code
int func;
writeln("\t\tEnter Selection : ");
func = readln;
writeln(
12 matches
Mail list logo