Example: Compute the absolute value

public static int main (string[] args) {
long val = -10;
print ("%ld\n", val.abs ());
return 0;
}

 valac --pkg glib-2.0 long.abs.vala

See:




2022 vala-language.org