-
-
Save obadz/c331c7657de7877c58658d04c1e4e56c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc final(x: ref int) = | |
echo x[], " was destroyed" | |
proc main() = | |
var a : ref int | |
new(a, final) | |
a[] = 5 | |
echo a[] | |
echo "Main is done" | |
main() | |
echo "After main" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment