summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoradmin (centauri.fritz.box) <puppet@mx.buetow.org>2014-06-30 23:25:24 +0200
committeradmin (centauri.fritz.box) <puppet@mx.buetow.org>2014-06-30 23:25:24 +0200
commit337c1c8abbe199670259bb043b95b541945427f4 (patch)
treefbb8560b9f1239b317cfb481d10383b0a51ab8bc /examples
parent21622fd15950bfb975ca8fef73a8ca1bd4c2a8e2 (diff)
parent1ec6dc9e106deed2e71bcad5ec74db65b9c61677 (diff)
Merge remote-tracking branch 'remotes/github/build-009669' into build-009669build-009669
Diffstat (limited to 'examples')
-rw-r--r--examples/assert.fy14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/assert.fy b/examples/assert.fy
new file mode 100644
index 0000000..d9871f5
--- /dev/null
+++ b/examples/assert.fy
@@ -0,0 +1,14 @@
+#*
+ * Examples of how to use asserts
+ *#
+
+# The built in function assert checks if a condition evaluates to true
+# and aborts the interpreter if it evaluates to false.
+
+# Evaluates to true
+assert 0 == 0
+assert 6 == 2 * 3
+
+# Evaluates to false
+# assert 1 == 0
+