Commit [r19393]  Maximize  Restore  History

___JmolVersion="14.1.11_2014.02.26"

bug fix: Jmol math fix for new . notation.
-- needs testing
-- examples:

-- note that .. notatino works with numbers
and in all expressions

b = [1 2 3 [ 1 2 [1 2 [1 [testing:"here"] 3]]]]
print b..4..3..1
b..2 = 34

b..2..1 = 33
print b..2..1

-- alternative single dot notation also on both sides
-- associative arrays only

b = [testing:"here"]
b.testing= 33
print b.testing

-- note that sequential brackets for arrays
work only on the left side of an assignment

b = [ [2] 10 11 ]
b[1][2]= 33
#NOT print b[1][2] (that's a range)

b = [1 2 3 [ 1 2 [1 2 [1 [testing:"here"] 3]]]]
b[4][3][3][2].more = "yes"
#NOT print b[4][3] (that's a range)

-- extends to matrices

b = quaternion()%"matrix"
b[1] = [1 2 3]
b[-1] = [1 2 3]
b[2][3] = 2

-- extends to string

b = "testing"
b[1] = "T"
b[1][3] = "T"
b["t"] = "T"

-- extends to points

p = {3 3 3}
p.x = 10
p.y = 5
p.z = 3

-- extends to bitsets

a = {*}
a.color = "red"
a.property_x = {*}.temperature.all

hansonr 2014-02-26

changed /trunk/Jmol/src/org/jmol/script/SV.java
changed /trunk/Jmol/src/org/jmol/script/ScriptCompiler.java
changed /trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java
changed /trunk/Jmol/src/org/jmol/script/ScriptMathProcessor.java
changed /trunk/Jmol/src/org/jmol/scriptext/ScriptExt.java
changed /trunk/Jmol/src/org/jmol/viewer/Jmol.properties
/trunk/Jmol/src/org/jmol/script/SV.java Diff Switch to side-by-side view
Loading...
/trunk/Jmol/src/org/jmol/script/ScriptCompiler.java Diff Switch to side-by-side view
Loading...
/trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java Diff Switch to side-by-side view
Loading...
/trunk/Jmol/src/org/jmol/script/ScriptMathProcessor.java Diff Switch to side-by-side view
Loading...
/trunk/Jmol/src/org/jmol/scriptext/ScriptExt.java Diff Switch to side-by-side view
Loading...
/trunk/Jmol/src/org/jmol/viewer/Jmol.properties Diff Switch to side-by-side view
Loading...