Subj : Re: syntax check To : =?ISO-8859-1?Q?Georg_Maa=DF?= From : Brendan Eich Date : Sat Jan 22 2005 08:52 am Georg Maaß wrote: > This is what my SM1.5rc5 outputs, which is identcal to what Igor said > about Rhino. Did the implementation change in SM1.5rc6, or is the > implementation configurable, or what might be the reason. > > var a = 1;function b(){var a=2; var s = Script("a = 0"); s(); > alert(a);};b(); alert(a); > > Mozilla also outputs 2 and zero. Oops, you are right. I thought that Script.prototype.exec (what s() calls, above) would get the activation object and cause the variable to be added to it, but no such luck. Script is a bad idea, given eval (which must be treated as a special form, a reserved identifier). Don't count on it being in future versions of any Mozilla engines. /be .