From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13070 invoked from network); 8 Jul 2001 21:20:20 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jul 2001 21:20:20 -0000 Received: (qmail 19615 invoked by alias); 8 Jul 2001 21:20:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15313 Received: (qmail 19603 invoked from network); 8 Jul 2001 21:20:14 -0000 To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: Parameters are being typed as float by default? In-reply-to: ""Bart Schaefer""'s message of "Sat, 07 Jul 2001 19:27:30 -0000." <1010707192731.ZM16575@candle.brasslantern.com> Date: Sun, 08 Jul 2001 23:22:32 +0100 From: Peter Stephenson Message-Id: <20010708222237.C62B914284@pwstephenson.fsnet.co.uk> "Bart Schaefer" wrote: > 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? That looks fine. In fact, (a.type != MN_UNSET) should be enough, because it will always be marked as unset if (what == EQ), but I wouldn't lose sleep over that. I looked to see if this is going to have further ramifications since there's no type coercion until the actual point of setting, but I couldn't find a case where it makes a difference (this almost is the point of setting, since that's all that equals does apart from returning the value/type just set). -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk