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

Evaluation of $# - bug?



Hi,

for some reasons

    set a b c 
    print $argv[$#-1]

prints nothing instead of "b", whereas both

    N=$#
    print $argv[$N-1]

and
    
    print $argv[1,#-1]

work as expected. Can anybody explain this behaviour, or is it a bug? 
It happens with 3.1.6 and 3.1.9-dev-7.

Regards,
Bernd

-- 
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



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