(I was referring to the reuse of var i and global i; actually this was
failing for any global)

Will update later in the day.

On Wed, Sep 23, 2015 at 7:04 AM, Robert Hanson <hans...@stolaf.edu> wrote:

> First thought is that we should  leave it this way.  That is really really
> bad programming.
> Fixed.
>
> On Wed, Sep 23, 2015 at 6:40 AM, Rolf Huehne <rhue...@fli-leibniz.de>
> wrote:
>
>> 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
>>
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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