Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | cmdr::validate - Tweaked the "integer" validation type to use decimal as internal representation, as we accept octal and hex as external strings. |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
47da046a2604672e1e958731cf843926 |
User & Date: | andreask 2014-03-13 20:04:59.140 |
Context
2014-04-15
| ||
19:27 | Hide docs from kettle's scanner for Tcl packages. check-in: 8a156a1311 user: andreask tags: trunk | |
2014-03-13
| ||
20:04 | cmdr::validate - Tweaked the "integer" validation type to use decimal as internal representation, as we accept octal and hex as external strings. check-in: 47da046a26 user: andreask tags: trunk | |
2014-02-19
| ||
20:20 | officer - Extended class to accept the unique prefixes of the known command names for dispatch. check-in: 434ada2661 user: andreask tags: trunk | |
Changes
Changes to validate.tcl.
︙ | ︙ | |||
92 93 94 95 96 97 98 | } proc ::cmdr::validate::integer::complete {p x} { debug.cmdr/validate {} 10 return {} } proc ::cmdr::validate::integer::validate {p x} { debug.cmdr/validate {} | > > > > | > > | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | } proc ::cmdr::validate::integer::complete {p x} { debug.cmdr/validate {} 10 return {} } proc ::cmdr::validate::integer::validate {p x} { debug.cmdr/validate {} # While we accept integers in octal and hex we convert them into # proper decimals for internal use, as our standard # representation. if {[string is integer -strict $x]} { return [format %d $x] } fail $p INTEGER "an integer" $x } # # ## ### ##### ######## ############# ##################### ## Any double namespace eval ::cmdr::validate::double { |
︙ | ︙ | |||
367 368 369 370 371 372 373 | if {![file readable $path]} {return 0} if {![file writable $path]} {return 0} return 1 } # # ## ### ##### ######## ############# ##################### ## Ready | | | 373 374 375 376 377 378 379 380 381 | if {![file readable $path]} {return 0} if {![file writable $path]} {return 0} return 1 } # # ## ### ##### ######## ############# ##################### ## Ready package provide cmdr::validate 1.2.1 return |