From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1572 invoked from network); 4 Nov 1998 21:35:47 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Nov 1998 21:35:47 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id QAA05473; Wed, 4 Nov 1998 16:31:06 -0500 (EST) Resent-Date: Wed, 4 Nov 1998 16:31:06 -0500 (EST) From: Phil Pennock Message-Id: <199811042134.VAA01156@athenaeum.demon.co.uk> Subject: Arithmetic expression (bug?) To: zsh-workers@math.gatech.edu Date: Wed, 4 Nov 1998 21:34:04 +0000 (GMT) X-Disclaimer-1: Any views expressed in this message, where not explicitly X-Disclaimer-2: attributed otherwise, are mine and mine alone. Such views X-Disclaimer-3: do not necessarily coincide with those of any organisation X-Disclaimer-4: or company with which I am or have been affiliated. X-Phase-of-Moon: The Moon is Full X-Mailer: ELM [version 2.4ME+ PL37 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"cqrmd.0.SL1.PUCGs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4543 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Okay, is a base-ten number, in the right context, an arithmetic expression? The manual-page bit dealing with Arithmetic Evaluation (zshmisc(1)) doesn't explicitly say so, but it seems obvious that it should. So, given this: -----------------------------< cut here >------------------------------- foo=alpha print -- ${(l<$[10]>)foo} print -- ${(l<10>)foo} -----------------------------< cut here >------------------------------- why does the third line produce: ./testfile: error in flags [3] ? According to zshexpn(1), the Parameter Expansion Flag 'l' expects the first field to be 'expr', the width of the output string. This would appear to be treated as a numerical value ;^) and I expected a value of '10' for the field to work. Is the bug in me or in zsh (3.1.5 unpatched)? Thanks. -- --> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+ G+ e+ h* r y?