diff options
Diffstat (limited to 'examples/ptrs.fwd')
| -rw-r--r-- | examples/ptrs.fwd | 21 |
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; -} |
