summaryrefslogtreecommitdiff
path: root/examples/types.fy
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-08-26 08:17:55 +0000
committerPaul Buetow <paul@buetow.org>2008-08-26 08:17:55 +0000
commit9bf07e1dfa69b5d6e4c296c0690b5ed91f909b7b (patch)
tree60f46be65a1fbaeed2f5deb1d4dbcf5ea68e0d01 /examples/types.fy
added v0.1 branch
Diffstat (limited to 'examples/types.fy')
-rw-r--r--examples/types.fy14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/types.fy b/examples/types.fy
new file mode 100644
index 0000000..1b9a0ac
--- /dev/null
+++ b/examples/types.fy
@@ -0,0 +1,14 @@
+#*
+ * Examples how to convert types
+ *#
+
+assert 1 == say 1; # Integer output
+
+assert 1 == say double 1; # Double output
+
+assert 14 == say 1 + string 13; # Implicit type conversion to Integer
+
+assert 2 == say integer 2.8; # Rounds down to the Integer 2
+
+assert say integer double string put say neg 12; # Nonsense but working :)
+