From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15773 invoked from network); 7 Jul 2001 19:29:21 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jul 2001 19:29:21 -0000 Received: (qmail 25950 invoked by alias); 7 Jul 2001 19:28:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15304 Received: (qmail 25938 invoked from network); 7 Jul 2001 19:28:15 -0000 From: "Bart Schaefer" Message-Id: <1010707192731.ZM16575@candle.brasslantern.com> Date: Sat, 7 Jul 2001 19:27:30 +0000 In-Reply-To: <1010707164314.ZM16164@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Re: Parameters are being typed as float by default?" (Jul 7, 4:43pm) References: <1010707160616.ZM14531@candle.brasslantern.com> <1010707164314.ZM16164@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Parameters are being typed as float by default? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 7, 4:43pm, Bart Schaefer wrote: } } } } let lines=$LINES-2 } } } } Why did $lines become float-typed? } } It became float-typed because at math.c:644, MN_UNSET != MN_INTEGER } } However, I don't know the right way to fix this. After some further study, the following seems to be sufficient, because `a' is never referenced again on `EQ'. Peter? --- zsh-forge/current/Src/math.c Fri Jul 6 20:16:59 2001 +++ zsh-4.0/Src/math.c Sat Jul 7 12:21:13 2001 @@ -641,7 +641,8 @@ b.type = MN_INTEGER; b.u.l = (zlong)b.u.d; } - } else if (a.type != b.type && what != COMMA) { + } else if (a.type != b.type && what != COMMA && + (a.type != MN_UNSET || what != EQ)) { /* * Different types, so coerce to float. * It may happen during an assigment that the LHS -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net