Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to define functions. #5

Closed
skx opened this issue Jun 20, 2022 · 0 comments · Fixed by #8
Closed

Allow users to define functions. #5

skx opened this issue Jun 20, 2022 · 0 comments · Fixed by #8

Comments

@skx
Copy link
Owner

skx commented Jun 20, 2022

Something like this:

proc square {x} { * $x $x }
square 7

This might mean we need to add continue, break, and return. We'll cross those bridges when we come to them..

skx added a commit that referenced this issue Jun 21, 2022
We're missing `return` support, which means that the return value
of a defined procedure is the last value executed.  That means the
fibonacci program I'm using to demonstrate looks a little clunky,
but it does work, and it works well.

This closes #5.
This was referenced Jun 21, 2022
@skx skx closed this as completed in #8 Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant