zsh-workers
 help / color / mirror / code / Atom feed
* Re: 3.0.8 math bug?
@ 2000-08-18  7:00 Sven Wischnowsky
  2000-08-18  8:56 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-08-18  7:00 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> ...
> 
> The semantic answer is "because the value of a variable evaluated in math
> context is treated as an expression, and that expression is itself
> evaluated."
> 
> ...
> 
> Hence in 3.1.somethingmorethan6butIforgetwhat, an arbitrary limit on the
> depth of math recursion was imposed, and you get:
> 
> > zsh: math recursion limit exceeded

Btw, I wasn't happy about this behaviour at that time, but then I
tried it with ksh and bash and both of them do the same as 3.1.x,
i.e. they report an recursion-too-deep error. I haven't tried which
shell allows the deepest recursion, though.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread
* 3.0.8 math bug?
@ 2000-08-17 17:54 Dan Nelson
  2000-08-17 20:53 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Nelson @ 2000-08-17 17:54 UTC (permalink / raw)
  To: zsh-workers


Why does evaluating a non-numeric variable cause 3.0.8 to consume all
available RAM and then exit to the parent shell?  At least 3.1.9
doesn't completely exit, but I would expect invalid variables to
evaluate to 0 just like unset variables do.

(dan@dan)/tmp> zsh -f
dan% echo $ZSH_VERSION
3.0.8
dan% a=a
dan% (( a ))
zsh: fatal error: out of memory
(dan@dan)/tmp>

(dan@dan)/tmp> zsh31 -f
dan% echo $ZSH_VERSION
3.1.9
dan% a=a
dan% (( a ))
zsh: math recursion limit exceeded
dan%



-- 
	Dan Nelson
	dnelson@emsphone.com


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

end of thread, other threads:[~2000-08-18  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-18  7:00 3.0.8 math bug? Sven Wischnowsky
2000-08-18  8:56 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2000-08-17 17:54 Dan Nelson
2000-08-17 20:53 ` 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).