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 15304
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Parameters are being typed as float by default?
- Date: Sat, 7 Jul 2001 19:27:30 +0000
- In-reply-to: <1010707164314.ZM16164@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1010707160616.ZM14531@xxxxxxxxxxxxxxxxxxxxxxx> <1010707164314.ZM16164@xxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author