On 09/22/2015 07:33 PM, Robert Hanson wrote:
> http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.16_2015.09.22.zip
>
> Jmol.___JmolVersion="14.3.16_2015.09.22"
>
> bug fix: for(var x in ...) does not respect "var"
>
Now a new global variable cannot be used in a 'for' loop:

---- Example Code -------------
function loopTest() {
   var testList = [1,2,3];

   for (var i in testList) {
     print "VAR: i=" + i;
   }

   for (i in testList) {
     print "NO VAR: i=" + i;
   }
}

loopTest;

---- Example Output -----------
VAR: i=1
VAR: i=2
VAR: i=3
NO VAR: i=
NO VAR: i=
NO VAR: i=
-------------------------------

Generally one wouldn't want to do this. But it worked in former versions 
and could break existing code. In my case the 'var' was missing 
accidentally.

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax:     +49 3641 65 6210
E-Mail:  rhue...@fli-leibniz.de
Website: http://www.fli-leibniz.de

           Scientific Director: Prof. Dr. K. Lenhard Rudolph
        Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to