Page MenuHomeDevCentral

registry incr <variable> <term> issue
Closed, ResolvedPublic

Description

How to repro?

15:47:29 <Dereckson> .tcl registry incr quux 5
15:47:29 <Daeghrefn> Tcl error: can't read "term": no such variable

Stacktrace

can't read "term": no such variable
    while executing
"registry set $key $term"
    (procedure "registry" line 29)
    invoked from within
"registry incr quux 5"

Issue

The procedure registry contains code to put 1 as default increment value, but not to use the parameter.

if {$value == ""} {set term 1}

That should become:

if {$value == ""} {set term 1} {set term $value}

An error should be triggered if value isn't numeric.

Event Timeline

dereckson triaged this task as Normal priority.Mar 27 2016, 15:51
dereckson updated the task description. (Show Details)
dereckson added a project: Dæghrefn.
dereckson renamed this task from registry incr kapak <term> issue to registry incr <variable> <term> issue.Mar 27 2016, 16:18

According the incr wiki.tcl.tk page, the term has to be an integer, as it's passed as parameter to TCL proc incr.