TABLE OF CONTENTS


::pwtk::type::range

SYNOPSIS

proc ::pwtk::type::range {type from to number} {

PURPOSE

Check if a 'number' is of correct type and is in the [from,to] range.

RETURN VALUE

SOURCE

    if { ! [::pwtk::type::number $type -strict $from] || ! [::pwtk::type::number $type -strict $to]
         ||  $number < $from || $number > $to } {
        return 0
    } else {
        return 1
    }
}