holey-bytes/hblang/examples/pointers.hb
2024-05-12 22:40:28 +02:00

12 lines
119 B
Plaintext

main := fn(): int {
a := 1;
b := &a;
modify(b);
return a - 2;
}
modify := fn(a: *int): void {
*a = 2;
return;
}