simple examples of how to

Wednesday, October 28, 2009

awk isnum function

function isnum(n) {return n ~ /^[+-]?[0-9]+$/}

how about

function isnum(n) { return n ~ /^[+-]?[0-9]+\.?[0-9]*$/ }

No comments:

Post a Comment