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

Re: PATCH: Explain array append a bit better



On Dec 5,  8:28am, Mikael Magnusson wrote:
}
} Should we perhaps mention array prepending somewhere too?

I suppose, but it's a special case of array slice assignment whereas
append is a whole different assignment operator with special behavior
for associative arrays.

Consequently I think this text ...

} +To prepend to an array, use the syntax (requires that tt(KSH_ARRAYS)
} +and tt(KSH_ZERO_SUBSCRIPT) are not set):
} +ifzman()
} +indent(var(name)tt([)var(1,0)tt(]=LPAR())var(value) ...tt(RPAR()))

... ought to be in "15.2.2 Array Element Assignment" rather than in
the introductory paragraphs in "15.2 Array Parameters".  Otherwise
you're introducing subscript assignment syntax without having told
the reader what it means.



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