Re: File Input

2017-05-13 Thread JV via Digitalmars-d-learn
On Monday, 8 May 2017 at 10:34:42 UTC, k-five wrote: On Monday, 8 May 2017 at 10:22:53 UTC, JV wrote: On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote: On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote: --- If I continue to learn D I will do b

Re: File Input

2017-05-08 Thread JV via Digitalmars-d-learn
On Monday, 8 May 2017 at 09:26:48 UTC, k-five wrote: On Monday, 8 May 2017 at 08:54:50 UTC, JV wrote: [...] --- Do not worry. Your request is not rude. I give you a better tool. I finished to collect some examples in D and in a few days I will

Re: File Input

2017-05-08 Thread JV via Digitalmars-d-learn
On Sunday, 7 May 2017 at 16:40:50 UTC, k-five wrote: On Sunday, 7 May 2017 at 15:59:25 UTC, JV wrote: [...] [...] -- You have the right for confusing :) there is many read and write names. But I assumed you are familiar w

Re: File Input

2017-05-07 Thread JV via Digitalmars-d-learn
On Sunday, 7 May 2017 at 15:16:58 UTC, k-five wrote: On Sunday, 7 May 2017 at 13:57:47 UTC, JV wrote: Hi guys I'd like to know how to get an input from the user to be stored in a .txt file using import std.file and is it possible to directly write in a .txt file without using a variable to s

File Input

2017-05-07 Thread JV via Digitalmars-d-learn
Hi guys I'd like to know how to get an input from the user to be stored in a .txt file using import std.file and is it possible to directly write in a .txt file without using a variable to store the user input? Thanks for the answer in advance my mind is kinda jumbled about this since im ne

Re: Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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);

Re: Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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

Re: Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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

Re: Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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

Re: Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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("

Re: Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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

Problem with using readln.

2017-04-29 Thread JV via Digitalmars-d-learn
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(