zsh-workers
 help / color / mirror / code / Atom feed
* Arithmetic expression (bug?)
@ 1998-11-04 21:34 Phil Pennock
  1998-11-04 22:05 ` Bernd Eggink
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Phil Pennock @ 1998-11-04 21:34 UTC (permalink / raw)
  To: zsh-workers

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]><x>)foo}
print -- ${(l<10><x>)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?


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-11-15 23:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-04 21:34 Arithmetic expression (bug?) Phil Pennock
1998-11-04 22:05 ` Bernd Eggink
1998-11-05  1:40   ` Phil Pennock
1998-11-15 22:21     ` Bart Schaefer
1998-11-15 22:46 ` Bart Schaefer
1998-11-15 23:19   ` PATCH: 3.1.5 and 3.0.5: ${(l<e><s1><s2>)param} (was Re: Arithmetic expression (bug?)) Bart Schaefer
1998-11-15 23:25 ` More about ${(l:e::s1::s2:)param} Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).