]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Relations1.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Relations1.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Relations1.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Relations1.scl
new file mode 100644 (file)
index 0000000..b15c1b8
--- /dev/null
@@ -0,0 +1,18 @@
+import "StandardLibrary"
+
+Concat ?x ?y ?z :-    
+    @bbf 1
+    ?z = ?x + ?y
+    
+    @bfb 0.5
+    startsWith ?z ?x
+    ?y = drop (length ?x) ?z
+    
+    @fbb 0.5
+    endsWith ?z ?y
+    ?x = take (length ?z - length ?y) ?z
+
+main = select ?y where 
+    Concat "Hello " ?y "Hello world!"
+--
+[world!]
\ No newline at end of file