On 2009-09-15 21:35:21, ludovic coues wrote:
> Hi people !
> As a begginer starting hacking some neko code, I wanna chat with my console.
> The idea is to end with a more or less game.
> 
> Right now, I can't figure out how to put something into a variable.
> neko.io.Input(1) doesn't seem to exist, and haxe.io.Input.::anything:: make
> haxe yell at me about some inexistent field...
> 
> (1) http://haxe.org/api/neko/io/input
As the page you referenced says: "See File and StringInput for two ways of
creating an Input." Input itself does not have any static fields so you
can't just use haxe.io.Input.anything. Try something like that:

var stdin : neko.io.FileInput = neko.io.File.stdin();
var foo = stdin.readLine();

With this code you will have variable `stdin' of type neko.io.FileInput
and one line of standard input will be read as String into `foo'.

-- 
Kacper

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to