aboutsummaryrefslogtreecommitdiffstats
path: root/test/resources/program.bork
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2016-06-22 22:33:33 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2016-07-26 19:47:10 +0300
commitfa02123ab00be8b8fe212c5d34ed021f1b63de74 (patch)
treea16534cafb01cf7e7dc12713815a2bc7188834b1 /test/resources/program.bork
parent695f7f3e2613d96a597e15a8c6142019098745c8 (diff)
Add double type and fix exception types
Diffstat (limited to 'test/resources/program.bork')
-rw-r--r--test/resources/program.bork14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/resources/program.bork b/test/resources/program.bork
index 52cee38..7034625 100644
--- a/test/resources/program.bork
+++ b/test/resources/program.bork
@@ -1,15 +1,13 @@
/* get an integer from the user */
-decl user_input
-set user_input in("give integer: ")
-out( concat("your input was: " user_input "!") )
-
-/* add 10 to the integer */
-decl operand set operand 10
+decl lhs decl rhs
+set lhs in("give an integer: ")
+set rhs in("give another: ")
+/* add the inputs together */
decl sum
-set sum + as_int(user_input) operand
+set sum + as_int(lhs) as_int(rhs)
/* print the sum */
-out( concat(user_input " + " operand " = " sum) )
+out( concat(lhs " + " rhs " = " sum) )
"done" \ No newline at end of file