Re: New question on strings
- From: Andreas Leitgeb <avl@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 28 Feb 2008 22:10:02 GMT
tom.rmadilo <tom.rmadilo@xxxxxxxxx> wrote:
In both cases, the solution doesn't address the initialization problem,
which you should do 'once', 'explicitly', and using the same code.
Initialization is having/making the array non-existant
The question is why? Well, my guess is that somewhere after the loop
code is finished filling the array, you may need to use the
information:
foreach {key num} [array get counter] {
puts "$key came up $num times"
}
array set initialCount $::profile::countInit
That is: array unset counter
But even that is needed only, if we had to repeat the counting inside
one procedure. And it even works for non-pre-guessable sets of keys.
.
- References:
- New question on strings
- From: mark
- Re: New question on strings
- From: mark
- Re: New question on strings
- From: Gerald W. Lester
- Re: New question on strings
- From: tom.rmadilo
- Re: New question on strings
- From: Neil Madden
- Re: New question on strings
- From: tom.rmadilo
- Re: New question on strings
- From: Bryan Oakley
- Re: New question on strings
- From: tom.rmadilo
- New question on strings
- Prev by Date: Re: tclhttpd with utf-8
- Next by Date: Re: tk_getOpenFile bug in Tk8.5.1
- Previous by thread: Re: New question on strings
- Next by thread: Re: New question on strings
- Index(es):