TABLE OF CONTENTS


::pwtk::type::gp_range

SYNOPSIS

proc ::pwtk::type::gp_range {range} {

PURPOSE

Check if the Gnuplot 'range' is in the [from:to] or from:to syntax, where 'from' and 'to' can be any string including the empty string because Gnuplot supports expressions and incomplete ranges, e.g., [from:] or [:to].

RETURN VALUE

SOURCE

    set r [split [string trim $range {[]}] :]
    if { $r ne {} && [llength $r] != 2 } {
        return 0
    }
    return 1
}