readf with strings

Ali Çehreli acehreli at yahoo.com
Wed Jun 22 11:31:45 PDT 2011


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 "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: ");

Ali


More information about the Digitalmars-d-learn mailing list