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

Re: saved from prince of eval



On Nov 9, 12:50am, Ray Andrews wrote:
}
}      foo="\$${IN[list]}[${IN[topE]}, ${IN[bottomE]}]"
}      IN[PAGE]="${(e)foo}"

${IN[list]} must name a normal array (because you can't do ranges of an
associative array), so I don't think you need (e), you just need (P):

   IN[PAGE]=${${(P)IN[list]}[IN[topE],IN[bottomE]]}

Because of math context in the enclosing [subscript]ing you don't need
the ${ } on IN[topE] etc.

The only time you'd want (e) is if you had something like

   IN[list]=array
   array=( '$x' '$y' )



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