1
0
Fork 0
forked from koniifer/ableos
ableos-framebuffer/hblang/examples/pointers.hb
2024-05-14 14:01:40 +02:00

18 lines
204 B
Plaintext

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