TABLE OF CONTENTS


::pwtk::type::numberlist

SYNOPSIS

proc ::pwtk::type::numberlist {args} {

USAGE

    ::pwtk::type::numberlist type ?-strict? numberlist

PURPOSE

Query if the elements in the numberlist are of corrected type. For the supported types, see ::pwtk::type::number

OPTION

ARGUMENTS

RETURN VALUE

1 or 0

SOURCE

    args_

    if { $strict eq "-strict" && $number eq {} } {
        return 0
    }

    # list elements can be comma or space separated
    foreach n [regsub -all , $number { }] {
        if { ! [number $type {*}$strict $n] } {
            return 0
        }
    }
    return 1
}