simple console input's not working...

Tower Ty towerty at msn.com.au
Fri Jun 6 03:00:53 PDT 2008


predaeus Wrote:

> SodiumFree Wrote:
> > inputTest.d(6): function tango.io.Console.Console.Input.readln (char[],bool) does not match parameter types ()
> > ...
> > Any idea what's going on?
> 
> From:
> http://www.dsource.org/projects/tango/docs/current/tango.io.Console.html
> "
> ...
> # final bool readln (ref char[] content, bool raw = false);
>     Retreive a line of text from the console and map it to the given argument. The input is sliced, not copied, so use .dup appropriately. Each line ending is removed unless parameter raw is set to true.
> 
>     Returns false when there is no more input.
> ...
> "
> 
> So, the syntax of readln is a bit different. You have to pass it the string that will hold the data.


I don't blame you if you are confused , so am I .
It should be pretty simple at this level and the book examples should at least work .

They sometimes don't and I'm buggered if I can understand why.
The guy that answers certainly does not put it clearly 
Lets hope some kind soul drops in and explains it to both of us !


More information about the Digitalmars-d-learn mailing list