Files
funk/tests/test.funk
2025-10-26 20:44:47 +11:00

32 lines
799 B
Plaintext

dingus func {
// println is an inbuilt function, you can also use print
println("you got dingused")
// for now, args for functions are accessed with arg0, arg1, etc
print("You said: ")
println(arg0)
// set a variable, similar to Python
x = 5
println(x)
// if statements are pretty standard
if (true) {
println("yay")
}
// types available are int, float, string, bool
println(321)
println(3.14)
println("I am a string!")
println(true)
}
// main is the entry point of the program, like many other languages
main func {
// call a function (with arguments!)
dingus("hehe")
}
// run this if you dare! try adding it in the main function!
infinity func {
while (true) {
println("to infinity and beyond!")
}
}