[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]JExpr.tc patch
From: |
Carl-Adam Brengesjö |
Subject: |
Re: [DotGNU]JExpr.tc patch |
Date: |
Wed, 5 May 2004 23:26:17 +0200 |
User-agent: |
KMail/1.5.4 |
Here's two patches with an sample .js file.
These patches fixes three problems with JScript.
Firstly, Eval(JAdd) tried to typecast the objects when added two values if one
was a string. This is incorrect and an typecast exception was thrown.
The correct solution is the ToString() method.
The second problem was using arrays.
var a = [1, "foo", 0.32];
print(a.length);
would output "0".
This problem is fixed with the ArrayObject.cs patch.
But I discovered another problem afterwards:
a.length now returned 1, instead of the expected 3.
Reason to this was that Eval(JArrayLiteral) didn't increase the value of index
after each loop.
On Wednesday 05 May 2004 15.00, Carl-Adam Brengesjö wrote:
> Some more cases should/will be added...
Sorry for this patch - I was preparing for this mail and apparently my mail
client sends the mail on ctrl+enter. :) just ignore it.
JExpr.tc.patch
Description: Text Data
ArrayObject.cs.patch
Description: Text Data
hello.js
Description: Text document