Re: New question on strings



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.

.