Hi, all.
Why incr return a sequence of numbers in this case:
% set a [dict create k 22]
k 22
% incr [dict get $a k]
1
% incr [dict get $a k]
2
% incr [dict get $a k]
3
% incr [dict get $a k]
4
% puts $a
k 22
Hi, all.
Why incr return a sequence of numbers in this case:
% set a [dict create k 22]
k 22
% incr [dict get $a k]
1
% incr [dict get $a k]
2
% incr [dict get $a k]
3
% incr [dict get $a k]
4
% puts $a
k 22
On 22/04/2022 12:44, Oleg Nemanov wrote:
Hi, all.
Why incr return a sequence of numbers in this case:
% set a [dict create k 22]
k 22
% incr [dict get $a k]
1
% incr [dict get $a k]
2
% incr [dict get $a k]
3
% incr [dict get $a k]
4
% puts $a
k 22
Evaluate
set 22
Does that help explain what's happening?
Alan
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 741 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 118:04:27 |
| Calls: | 12,465 |
| Calls today: | 7 |
| Files: | 15,200 |
| Messages: | 6,538,261 |