aboutsummaryrefslogtreecommitdiffstats
path: root/examples/arithmetic.bdl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/arithmetic.bdl')
-rw-r--r--examples/arithmetic.bdl34
1 files changed, 17 insertions, 17 deletions
diff --git a/examples/arithmetic.bdl b/examples/arithmetic.bdl
index 5e102e9..83404e2 100644
--- a/examples/arithmetic.bdl
+++ b/examples/arithmetic.bdl
@@ -1,22 +1,22 @@
1; 1;;
2; Basic arithmetic operations 2;; Basic arithmetic operations.
3; 3;;
4 4
5; Addition 5;; Addition.
6(+ 10 100) 6(print "(+ 10 100) -> ") (+ 10 100)
7(+ 1 -2 3 4) 7(print "(+ 1 -2 3 4) -> ") (+ 1 -2 3 4)
8 8
9; Substraction 9;; Substraction.
10(- 100 75) 10(print "(- 100 75) -> ") (- 100 75)
11(- 10 20 30) 11(print "(- 10 20 30) -> ") (- 10 20 30)
12 12
13; Multiplication 13;; Multiplication.
14(* 10 7) 14(print "(* 10 7) -> ") (* 10 7)
15(* -1 66) 15(print "(* -1 66) -> ") (* -1 66)
16 16
17; Division 17;; Division.
18(/ 45 5) 18(print "(/ 45 5) -> ") (/ 45 5)
19(/ 10 5 2) 19(print "(/ 10 5 2) -> ") (/ 10 5 2)
20 20
21; Nesting operations. 21;; Nesting operations.
22(* 20 (+ 100 (- 50 30) (/ 300 3)) 10) 22(print "(* 20 (+ 100 (- 50 30) (/ 300 3)) 10) -> ") (* 20 (+ 100 (- 50 30) (/ 300 3)) 10)