Code: Select all
do(
var([atmNextNode], vbAtom, Out(2, c)),
var([atmPrevNode], vbAtom, Out(3, c)),
var([valRow], vbValue),
valRow := IndexMatch(NrOc(atmPrevNode), atmNextNode, out(count, atmPrevNode)),
If(
valRow > 0,
Cell(valRow, 2, atmPrevNode) := Cell(valRow, 2, atmPrevNode) - 1
),
valRow := IndexMatch(NrOc(atmNextNode), atmPrevNode, out(count, atmNextNode)),
If(
valRow > 0,
Cell(valRow, 2, atmNextNode) := Cell(valRow, 2, atmNextNode) + 1
),
sddb([t-temp],ptv(out(2,c)),c),
connect(2,c,0,out(3,c)),
connect(3,c,0,vtp(ddb([t-temp],c))),
setatt([octoprev],indexmatch(nroc(out(2,c)),atomid(out(count,out(2,c))),atomid(out(3,c))),c),
setatt([octocur],indexmatch(nroc(out(3,c)),atomid(out(count,out(3,c))),atomid(out(2,c))),c),
sddb([t-temp],0,c)
)