summaryrefslogtreecommitdiff
path: root/nl
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-02-01 13:06:20 +0100
committertomsmeding <tom.smeding@gmail.com>2017-02-01 13:06:20 +0100
commit238d16ef9e183275ab00a72ed61a280501b9bcad (patch)
treeae57db7b78ba4c9c20c57971b8fb3e5540a30233 /nl
parent00a56284a8649d041af079fe466f94034f2ee1fb (diff)
More operators and less function pointers
Diffstat (limited to 'nl')
-rw-r--r--nl/test_string.nl7
1 files changed, 3 insertions, 4 deletions
diff --git a/nl/test_string.nl b/nl/test_string.nl
index c70b395..e71fc3c 100644
--- a/nl/test_string.nl
+++ b/nl/test_string.nl
@@ -3,6 +3,7 @@ type char = i8;
type string = ptr(char);
extern func void(int) putchar;
+extern func int(string) puts;
void f(char c) {
putchar(c);
@@ -11,9 +12,7 @@ void f(char c) {
int main(int argc, ptr(string) argv) {
string s = "kaas";
ptr(i8) s2 = "kaas2";
- ptr(func void(char)) ptr1;
- ptr(func void(char)) ptr2;
- f((ptr1 == ptr2) + 'a');
- f('x');
+ //f('x');
+ puts(s2);
return 0;
}