Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
nested arithmetic expansion
- X-seq: zsh-users 12104
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: nested arithmetic expansion
- Date: Thu, 25 Oct 2007 16:58:06 +1300 (NZDT)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
how come $[...] doesn't work when nested in a parameter, but the other
(older?) form $((...)) does?
% print ${$((2+3))}
5
% print ${$[2+3]}
<nothing>
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"So what do we do if we get bitten by something deadly, then?"
He blinked at me as if I was stupid.
"Well what do you think you do?" he said. "You die of course.
That's what deadly means."
-- Douglas Adams, Last Chance To See
Messages sorted by:
Reverse Date,
Date,
Thread,
Author