mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2026-11-05 00:02:20 +00:00
add a standard library, and introduce formed imports (import std "myfile.pork")
This commit is contained in:
18 files changed
+153
-32
No files matched your search
@@ -0,0 +1,5 @@
|
||||
export func malloc(size)
|
||||
native ffi "c:malloc:void*"
|
||||
|
||||
export func free(pointer)
|
||||
native ffi "c:free:void"
|
||||
@@ -0,0 +1,15 @@
|
||||
export func add(a, b) {
|
||||
a + b
|
||||
}
|
||||
|
||||
export func subtract(a, b) {
|
||||
a - b
|
||||
}
|
||||
|
||||
export func multiply(a, b) {
|
||||
a * b
|
||||
}
|
||||
|
||||
export func divide(a, b) {
|
||||
a / b
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
numbers.pork
|
||||
Reference in new issue
Block a user