aboutsummaryrefslogtreecommitdiff
path: root/examples/ptrs.fwd
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-05-01 22:43:13 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2026-05-01 22:43:13 +0300
commitdb3809488805fbdcd9d726d9ed45ad7335812bd1 (patch)
treedcf1ceb68a7d77733a474825a9804fe99d253b48 /examples/ptrs.fwd
parentf1e9860ab638594e95db0ada848157b860eeb831 (diff)
downloadfwd-db3809488805fbdcd9d726d9ed45ad7335812bd1.tar.gz
fwd-db3809488805fbdcd9d726d9ed45ad7335812bd1.zip
remove examples in favour of testsHEADmaster
+ Might come up with proper examples at some point, but for now tests at least tell us if they're broken
Diffstat (limited to 'examples/ptrs.fwd')
-rw-r--r--examples/ptrs.fwd21
1 files changed, 0 insertions, 21 deletions
diff --git a/examples/ptrs.fwd b/examples/ptrs.fwd
deleted file mode 100644
index a1efc84..0000000
--- a/examples/ptrs.fwd
+++ /dev/null
@@ -1,21 +0,0 @@
-extern fwd_copy(auto x, (auto, auto) ok);
-extern fwd_println(auto x);
-extern fwd_intalloc((*int) ok);
-
-main()
-{
- fwd_intalloc() => *int i;
- fwd_copy(i) => *int i1, *int i2;
-
- /* convert raw pointer to reference, unsure if this should be a
- * built-in or a library feature */
- fwd_null(i1) => {
- fwd_println("Pointer was null");
- /* error out or something */
- } => &int i;
-
- fwd_println(i);
-
- /* Try uncommenting, deref of raw pointer is not allowed! */
- // i* + 20 => int something;
-}