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

Re: array not working



On 11/26/06, zzapper <david@xxxxxxxxxx> wrote:

Started new shell and problem went away, but arrays now seem to be
indexed from 1 rather than zero??

From zshparam(1):

      Individual  elements  of an array may be selected using a subscript.  A
      subscript of the form `[exp]' selects the single element exp, where exp
      is  an arithmetic expression which will be subject to arithmetic expan-
      sion as if it were surrounded by `$((...))'.  The elements are numbered
      beginning  with  1,  unless  the KSH_ARRAYS option is set in which case
      they are numbered from zero.

And this has, as far as I know, always been the case.

 nikolai



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