]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Equations1.scl
Supply SVG text editor with element measurement context
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Equations1.scl
1 import "Prelude"
2 import "Expressions/Equations"
3
4 main = v
5   where
6     v = solveEquations do
7         listenEquationVariable "a" $ \a -> setEquationVariable "c" (a-1)
8         setEquationVariable "a" 123
9         listenEquationVariable "a" $ \a -> setEquationVariable "b" (a+1)
10     print v 
11 --
12 [(a,123), (b,124), (c,122)]
13