Example: Write to stderr

public int main (string[] args) {
// Output:
// ``Formated error string``
// ``Simple error string``
stderr.printf ("%s %s %s\n", "Formated", "error", "string");
stderr.puts ("Simple error text");
stderr.putc ('\n');
return 0;
}

 valac --pkg glib-2.0 stderr.vala

See:




2022 vala-language.org