# Example from page 78
# isnum returns True if its argument is a valid number.
# The first pattern requires a digit before the decimal
# point, and the second after the decimal point.
function isnum # string
{
    case $1 in
    ?([-+])+([0-9])?(.)*([0-9])?([Ee]?([-+])+([0-9])) )
        return 0;;
    ?([-+])*([0-9])?(.)+([0-9])?([Ee]?([-+])+([0-9])) )
        return 0;;
    *) return 1;;
    esac
    # Not reached.
}
