On Friday, 27 March 2015 at 04:37:34 UTC, jonaspm wrote:
Please, i need your help, I tried this:

write("Write p: ");
readln(p);
p = chomp(p);
writeln("Write q: ");
readln(q);
q = chomp(q);

but the result is:
Write p: Write q:

and doesn't pause to read keyboard input... what's wrong?

Thanks in advance!

This works for me on Linux:
---

import std.stdio;
import std.string;
void main()
{
    char[] p, q;
    p.length=1024;
    q.length=1024;

    write("Write p: ");
    readln(p);
    p=p.chomp;

    write("Write q: ");
    readln(q);
    q=q.chomp;

    writeln; writefln("p=%s, q=%s", p,q);
}
---

bye,
lobo

Reply via email to