[Vala] Beginners question about keyboard input
- From: "Barry Kauler" <bkauler gmail com>
- To: vala-list gnome org
- Subject: [Vala] Beginners question about keyboard input
- Date: Tue, 2 Dec 2008 05:56:26 +0800
I'm learning Vala, using the Genie syntax, and I'm stuck on something.
It would be great if a kind soul reading this would take a moment to
help me out.
I'm writing a console app and I want to read one line from the keyboard.
The C function gets() seems to be the one, however I get this this far:
var a = new array of char
But what I really want is a string, and I don't know how to convert an
array of chars to a string in Vala/Genie. Could someone tell me how?
Note, I searched the vala-list but the only posts about stdin.gets
show it used like this:
so it must have got redefined at some time.
Ah, it's so easy in Bash:
] [Thread Prev