TABLE OF CONTENTS
::pwtk::type::intseq
SYNOPSIS
proc ::pwtk::type::intseq {value {increment 1}} {
PURPOSE
Check if a 'value' is a continuous integer sequence (e.g. 5 7 9 11)
ARGUMENTS
- value --- the value to check
- increment --- requested increment for the sequence (default = 1, e.g. value = {5 6 7 8})
RETURN VALUE
- 1 if number is of correct type
- 0 otherwise
SOURCE
foreach i $value { ::pwtk::ifexist iold { if { $i - $iold != $increment } { return 0 } } set iold $i } return 1 }