Fucntion types

This commit is contained in:
nub31
2025-05-14 19:06:26 +02:00
parent 0a9442c044
commit ec06c5eaf5
2 changed files with 124 additions and 20 deletions

View File

@@ -1,16 +1,13 @@
import c;
struct Human {
age: i64;
name: string;
age: i8;
}
global func main() {
me = new Human
{
age = 21;
name = "Oliver";
};
printf("My name is %s and i am %d years old\n", me.name, me.age);
printf("%d\n", addbyte(10, 300));
}
func addbyte(a: i32, sb: i8): i32 {
return a + sb;
}