Yes, that's (finally!) the correct behavior. Whew! In Jmol, functions are top-level objects, just as in JavaScript. I'm toying with the idea of private functions, objects, and "this.xxx" but it's not a priority.
Bob On Thu, Apr 3, 2014 at 11:26 AM, Ron Mignery <[email protected]> wrote: > Not that there's anything wrong with it but release 14.0.13 of the > application fails a script if globals are defined with var whereas earlier > versions do not. > test script: > var x = "X" > function test { > print _version > print x > } > In version 14.0.13 test prints: > 1400013 > whereas in 14.0.12 it prints > 1400012 > X > If the var is deleted, then 14.0.13 test prints: > 1400013 > X > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jmol-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor 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
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

