]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Relations1.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Relations1.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Relations1.scl b/bundles/org.simantics.scl.compiler/tests/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