Example: Write a char to the stream

static int main () {
// Output: ``Could MacGyver use it to save the world?``
string str = "Could MacGyver use it to save the world?\n";
for (int i = 0; str[i] != '\0'; i++) {
stdout.putc (str[i]);
}
return 0;
}

 valac --pkg glib-2.0 GLib.FileStream.putc.vala

See: