2025-09-14 15:12:30 +02:00
|
|
|
#!/usr/bin/env fun
|
|
|
|
|
|
2025-09-16 02:11:22 +02:00
|
|
|
/*
|
|
|
|
|
* This file is part of the Fun programming language.
|
2025-10-09 01:59:19 +02:00
|
|
|
* https://fun-lang.xyz/
|
2025-09-16 02:11:22 +02:00
|
|
|
*
|
|
|
|
|
* Copyright 2025 Johannes Findeisen <you@hanez.org>
|
2025-09-30 22:52:12 +02:00
|
|
|
* Licensed under the terms of the Apache-2.0 license.
|
|
|
|
|
* https://opensource.org/license/apache-2-0
|
2025-09-16 02:11:22 +02:00
|
|
|
*/
|
2025-09-18 02:39:07 +02:00
|
|
|
|
2025-09-14 15:20:23 +02:00
|
|
|
// Have fun in Fun
|
2025-09-14 15:12:30 +02:00
|
|
|
|
2025-09-14 15:20:23 +02:00
|
|
|
string s = "Have fun!"
|
2025-12-23 20:49:07 +01:00
|
|
|
|
2025-09-14 15:12:30 +02:00
|
|
|
fun have_fun()
|
2025-09-14 15:20:23 +02:00
|
|
|
print("Have fun!")
|
|
|
|
|
print(s)
|
|
|
|
|
number n = 10
|
|
|
|
|
print(n)
|
2025-09-14 15:12:30 +02:00
|
|
|
|
|
|
|
|
have_fun()
|
2025-12-23 20:49:07 +01:00
|
|
|
|
|
|
|
|
print("Have fun!")
|
|
|
|
|
|
|
|
|
|
/* Expected output:
|
|
|
|
|
Have fun!
|
|
|
|
|
Have fun!
|
|
|
|
|
10
|
|
|
|
|
Have fun!
|
|
|
|
|
*/
|
|
|
|
|
|