From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4650 invoked by alias); 14 May 2011 18:01:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29286 Received: (qmail 19707 invoked from network); 14 May 2011 18:00:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110514110040.ZM14542@torch.brasslantern.com> Date: Sat, 14 May 2011 11:00:40 -0700 In-reply-to: Comments: In reply to Mikael Magnusson "Re: Infinite recursions in math evaluation" (May 14, 11:03am) References: <110513213633.ZM13611@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: Infinite recursions in math evaluation MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On May 14, 11:03am, Mikael Magnusson wrote: } } > "The value of $val1" in an arithmetic context is the result of doing } > arithmetic evaluation on whatever is stored in the parameter. If } > that's the name of another (or even the same) parameter, then ... } } How did you get this from the quoted part? I did say it was implicit. :-) At each nested level of substitution, the substituted words undergo all forms of single-word substitution (i.e. not filename generation), including command substitution, arithmetic expansion and filename expansion In ((var)), "var" is a nested arithmetic expansion. Inside the value of var, any mention of another bare parameter name is thus also a nested arithmetic expansion.