On 06/23/2011 02:27 AM, Dainius (GreatEmerald) wrote:
I have a related enhancement request since lot of time:
http://d.puremagic.com/issues/show_bug.cgi?id=4716
Bye,
bearophile
That's exactly what I'd like to see. Voted.
After all, D is created with practicality in mind, and doing all that
p
> I have a related enhancement request since lot of time:
> http://d.puremagic.com/issues/show_bug.cgi?id=4716
>
> Bye,
> bearophile
>
That's exactly what I'd like to see. Voted.
After all, D is created with practicality in mind, and doing all that
parsing is the opposite of what it's trying to a
Ali Çehreli:
> "oku" means "read":
>
> // Read into an existing variable
> double d;
> oku("Please enter a double: ", &d);
>
> // Read and return a value
> int i = oku!int("Please enter an int: ");
I have a related enhancement request since lot of time:
http://d.puremagic.co
On 06/22/2011 09:30 AM, Ali Çehreli wrote:
On Wed, 22 Jun 2011 14:57:57 +, GreatEmerald wrote:
This should be a very elementary question. How do you get a string off
stdin? Or an integer, or a boolean, for that matter? If I use this:
float MyFloat;
string MyString;
readf("%f",&MyF
On Wed, 22 Jun 2011 13:45:56 -0500, Jimmy Cao wrote:
> On Wed, Jun 22, 2011 at 1:31 PM, Ali Çehreli wrote:
>
>> On Wed, 22 Jun 2011 20:17:39 +0200, Andrej Mitrovic wrote:
>>
>> > This library has some nice user-input methods for D2:
>> > https://github.com/he-the-great/JPDLibs/tree/cmdln
>>
>> T
On Wed, Jun 22, 2011 at 1:31 PM, Ali Çehreli wrote:
> On Wed, 22 Jun 2011 20:17:39 +0200, Andrej Mitrovic wrote:
>
> > This library has some nice user-input methods for D2:
> > https://github.com/he-the-great/JPDLibs/tree/cmdln
>
> Thanks! :)
>
> The Turkish D community has experimented with a si
I didn't know there was a Turkish D community. :)
On Wed, 22 Jun 2011 20:17:39 +0200, Andrej Mitrovic wrote:
> This library has some nice user-input methods for D2:
> https://github.com/he-the-great/JPDLibs/tree/cmdln
Thanks! :)
The Turkish D community has experimented with a similar solution:
http://ddili.org/forum/post/2960
"oku" means "r
On Wed, 22 Jun 2011 20:59:46 +0300, Dainius (GreatEmerald) wrote:
> I see. Using %s does indeed work with ints, and chomp(readln()) works
> with strings. It's rather counter-intuitive, though.
There are many counter intuitive bits and imperfect modelling in stream I/
O. For example "42a" is perfe
This library has some nice user-input methods for D2:
https://github.com/he-the-great/JPDLibs/tree/cmdln
I see. Using %s does indeed work with ints, and chomp(readln()) works
with strings. It's rather counter-intuitive, though.
I wonder why there isn't a simpler way to do this, something like
writeln() - you could input the variables as parameters and it would
automatically read them...
On Wed, 22 Jun 2011 14:57:57 +, GreatEmerald wrote:
> This should be a very elementary question. How do you get a string off
> stdin? Or an integer, or a boolean, for that matter? If I use this:
>
> float MyFloat;
> string MyString;
> readf("%f", &MyFloat);
> writeln(MyFloat);
> rea
12 matches
Mail list logo