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

Re: Treatment of illegal indices



On Feb 22,  4:07pm, Bernd Eggink wrote:
} Subject: Treatment of illegal indices
}
} The way zsh treats illegal array indices is pretty ugly. It simply
} replaces indices which are 0 (with KSH_ARRAYS unset) or < -length by 1.
} This doesn't make much sense and can cause hard-to-detect errors.

I agree that this is counter-intuitive.

} c) Print an error message if an illegal index is used on the left      
} side of an assignment, return an empty value otherwise.

I believe this to be the best behavior.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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