diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-17 18:38:50 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-17 18:38:50 +0200 |
commit | c581804c6ffa5824a9b762097a990425007e49cf (patch) | |
tree | 516e314a60d537d8e1617f945afc8a12b3e0d61f /examples/arithmetic.bdl | |
parent | 7fee0fc28809042a2ecbc03f2e1b5b569073982b (diff) | |
download | bdl-c581804c6ffa5824a9b762097a990425007e49cf.tar.gz bdl-c581804c6ffa5824a9b762097a990425007e49cf.zip |
Add let/set/struct parsing
Diffstat (limited to 'examples/arithmetic.bdl')
-rw-r--r-- | examples/arithmetic.bdl | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/examples/arithmetic.bdl b/examples/arithmetic.bdl deleted file mode 100644 index c313dbb..0000000 --- a/examples/arithmetic.bdl +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | ;; | ||
2 | ;; Basic arithmetic operations. | ||
3 | ;; | ||
4 | |||
5 | ;; Addition. | ||
6 | (print "(+ 10 100) -> ") | ||
7 | (display (+ 10 100)) | ||
8 | (newline) | ||
9 | |||
10 | (print "(+ 1 -2 3 4) -> ") | ||
11 | (display (+ 1 -2 3 4)) | ||
12 | (newline) | ||
13 | |||
14 | ;; Substraction. | ||
15 | (print "(- 100 75) -> ") | ||
16 | (display (- 100 75)) | ||
17 | (newline) | ||
18 | |||
19 | (print "(- 10 20 30) -> ") | ||
20 | (display (- 10 20 30)) | ||
21 | (newline) | ||
22 | |||
23 | ;; Multiplication. | ||
24 | (print "(* 10 7) -> ") | ||
25 | (display (* 10 7)) | ||
26 | (newline) | ||
27 | |||
28 | (print "(* -1 66) -> ") | ||
29 | (display (* -1 66)) | ||
30 | (newline) | ||
31 | |||
32 | ;; Division. | ||
33 | (print "(/ 45 5) -> ") | ||
34 | (display (/ 45 5)) | ||
35 | (newline) | ||
36 | |||
37 | (print "(/ 10 5 2) -> ") | ||
38 | (display (/ 10 5 2)) | ||
39 | (newline) | ||
40 | |||
41 | ;; Remainder/modulo. | ||
42 | (print "(% 45 5) -> ") | ||
43 | (display (% 45 5)) | ||
44 | (newline) | ||
45 | |||
46 | (print "(% 45 7) -> ") | ||
47 | (display (% 45 7)) | ||
48 | (newline) | ||
49 | |||
50 | (print "(% 120 45) -> ") | ||
51 | (display (% 120 45)) | ||
52 | (newline) | ||
53 | |||
54 | (print "(% 120 45 8) -> ") | ||
55 | (display (% 120 45 8)) | ||
56 | (newline) | ||
57 | |||
58 | ;; Nesting operations. | ||
59 | (print "(* 20 (+ 100 (- 50 30) (/ 300 3)) 10) -> ") | ||
60 | (display (* 20 (+ 100 (- 50 30) (/ 300 3)) 10)) | ||