Example: Terminate the program

public static void shutdown () {
Process.exit (0);
}

public static int main (string[] args) {
// Output: ````
shutdown ();
print ("You can't see me!\n");
return 0;
}

 valac --pkg glib-2.0 GLib.Process.exit.vala

See:




2022 vala-language.org