TABLE OF CONTENTS
::pwtk::type::optionlist
SYNOPSIS
proc ::pwtk::type::optionlist {args} {
USAGE
::pwtk::type::optionlist allowedValues ?-strict? value
PURPOSE
Query if the value is one among the allowed values (allowed values are values of the optionlist).
OPTION
- -strict -- if this option is specified, the empty value does not much
ARGUMENTS
- allowedValues -- list of allowed values (aka optionlist)
- value -- value to check (it must be one among the allowed values)
RETURN VALUE
1 or 0
SOURCE
args_ set allowedValues $type set value $number if { $strict eq {} && $value eq {} } { return 1 } else { return [expr {$value in $allowedValues}] } }