Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: uninvited members of associative array




On 2022-12-15 16:05, Lawrence Velázquez wrote:
How are you creating and populating "main"? Can you provide a test
case that the rest of us can actually use?

There's always the chance it doesn't even come to that, some artifact in the way the array prints or something.   But if you need to see an initialization:


# nlist(): Initialize 'main' array.  10 elements: -----------------------------
main[window]="main"
main[list]='List'
main[lastE]="$#List"
main[hight]=$(( mainWH - 2 ))
main[width]=$(( mainWW - 2 ))
main[bottomE]="$main[hight]"
main[topE]=1
main[currentE]=1
main[offset]=0
main[active]=1

... all values assign properly, so where do the uninvited keywords come from?  As Bart explained, the order of the printout has no regularity, so there's no pattern to look for.








Messages sorted by: Reverse Date, Date, Thread, Author