1
0
Fork 0
forked from fun/fun

All incomplete examples have been updated and some corrections have been made to the parser to make them work. (0.37.17)

This commit is contained in:
Johannes Findeisen 2025-12-23 20:49:07 +01:00
commit 92aacff71a
41 changed files with 654 additions and 130 deletions

View file

@ -11,7 +11,7 @@
// Demonstrates system library includes after installation to /usr/lib/fun
// includes can also be done with a leading # like in C, but some programmers maybe like more clean code without a
// includes can also be done with a leading # like in C, but some programmers maybe like more clean code without a
// leading #.
include <hello.fun>
include <utils/math.fun>
@ -24,3 +24,10 @@ number y = 32
print("add(" + to_string(x) + ", " + to_string(y) + ") = " + to_string(add(x, y)))
print("times(" + to_string(x) + ", " + to_string(y) + ") = " + to_string(times(x, y)))
/* Expected output:
== include lib demo ==
Hello from system lib!
add(10, 32) = 42
times(10, 32) = 320
*/