Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3113 clock scan invalidates variable

obsolete: 8.5a2
closed-fixed
Kevin B KENNY
7
2005-04-19
2005-04-19
Ulrich Ring
No

Using "clock scan" invalidates variable "i":

EXAMPLE:

run tclsh:

% info patchlevel
8.5a2
% set i 1
1
% clock scan 1
1113865200
% set i
can't read "i": no such variable

NOTES:

(a) same with variable named "j", but not with "a", for
example
(b) repeat "set i ... etc." and variable i seems to be
stable

Rather strange, isn't it.

Discussion

    • labels: 105657 --> 06. Time Measurement
    • priority: 5 --> 7
     
    • assigned_to: dkf --> kennykb
     
  • Logged In: NO

    It's caused by line 267

    unset i j

    in library/clock.tcl

    The question is, why does this affect the global variable given
    that it is in a "namespace eval ::tcl::clock { ... }"

     
  • Kevin B KENNY
    Kevin B KENNY
    2005-04-19

    • status: open --> closed-fixed
     
  • Kevin B KENNY
    Kevin B KENNY
    2005-04-19

    Logged In: YES
    user_id=99768

    "That's not a bug, that's a feature". Well, it's a MISfeature.
    To quote Miguel Sofer this morning:
    miguel if even *you* fall for it ... lets kill the sucker! I
    hate it hate it hate it hate it ...

    Thanks for reporting this.