Am 28.03.15 um 02:38 schrieb Robert Hanson:
> simple enough! Great idea, Rolf. Just use "."
>
> Jmol.___JmolVersion="14.3.13_2015.03.27"
>
> new feature: "." notation extended to x.[a]
>disambiguifies x[a][b][c]...
>allows for variables and expressions in "." notation
>i = 2
>x = [1
see http://chemapps.stolaf.edu/jmol/zip/jmol-14.3.13_2015.03.27.zip
:)
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your h
simple enough! Great idea, Rolf. Just use "."
Jmol.___JmolVersion="14.3.13_2015.03.27"
new feature: "." notation extended to x.[a]
disambiguifies x[a][b][c]...
allows for variables and expressions in "." notation
i = 2
x = [1,[2 3 4 [5 6 7]],3]
show x[2].[4].[i]
6
x = [ 1,[ 2,3,4,[
I see, so
"if ($x{$key1}[$i][$j]{$key2} eq $y{$key3}[$k][$l]{$key4})"
"if ($x{$key1}->[$i]->[$j]->{$key2} eq $y{$key3}->[$k]->[$l]->{$key4})"
in Jmol would be:
if ( (((x[key1])[i])[j])[key2] == ...
and that is a pain because of all the parens. You would like this to read:
if ( x[key1]..[i]..[
Am 27.03.15 um 21:52 schrieb Robert Hanson:
> Interesting idea. Rolf. Are you aware of Jmol's recently added .. notation?
>
> x = {"a": {"1": ["x", "y", "z"], "2": ["I", "II"]}}
>
> print x
> print x..a
> print x..a..1
> print x..a..1..2
>
> Does that satisfy your needs? It is only for regular arra
Interesting idea. Rolf. Are you aware of Jmol's recently added .. notation?
x = {"a": {"1": ["x", "y", "z"], "2": ["I", "II"]}}
print x
print x..a
print x..a..1
print x..a..1..2
Does that satisfy your needs? It is only for regular arrays or associative
arrays with simple keys. You can't do this:
Hi Bob and others,
currently it can be difficult to get/set elements within a multi-level
nested array/hash data structure in Jmol depending on the context.
Example data structure:
x = {"a": {"1": ["x", "y", "z"], "2": ["I", "II"]}}
And there is also the ambiguity of an expression like 'x[1]