Most new awks have an int() function.
But the method for casting documented in ‘The Awk Programming Language’ is shown as you do it, by using numericValue and +0
. I don’t have the book handy, but I think you can also cast for float value by using +0.0
.
I hope this helps.