Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parameters are being typed as float by default?
- X-seq: zsh-workers 15313
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Parameters are being typed as float by default?
- Date: Sun, 08 Jul 2001 23:22:32 +0100
- In-reply-to: ""Bart Schaefer""'s message of "Sat, 07 Jul 2001 19:27:30 -0000." <1010707192731.ZM16575@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
"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 <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author