mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-16 07:14:07 +10:00
Function calls, with args and single returns are working
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
|
||||
|
||||
fn name(argument: type, arg2: type, ...rest): int {
|
||||
print "hello world";
|
||||
return 0;
|
||||
fn name(param1, param2) {
|
||||
print "foobar";
|
||||
print param1;
|
||||
return param2;
|
||||
}
|
||||
|
||||
var result = name("hello world", "goodnight world");
|
||||
|
||||
print name;
|
||||
print "fizz";
|
||||
print result;
|
||||
print "buzz";
|
||||
|
||||
Reference in New Issue
Block a user