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 mutation of array arguments #160

Open
joe-p opened this issue Oct 13, 2023 · 0 comments
Open

allow mutation of array arguments #160

joe-p opened this issue Oct 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@joe-p
Copy link
Contributor

joe-p commented Oct 13, 2023

Currently arrays are passed by reference when setting variables, but not when passing to a function. To have the same behavior as JavaScript, the array should be passed by reference.

For variables, this can be done via scratch. For storage, the values of the key (and potentially account) will need to be passed to the subroutine rather than the value.

@joe-p joe-p added blocking-stable enhancement New feature or request labels Oct 13, 2023
@joe-p joe-p added this to the Stable Release milestone Oct 13, 2023
@joe-p joe-p added bug Something isn't working and removed blocking-stable enhancement New feature or request labels Oct 13, 2023
@joe-p joe-p added enhancement New feature or request and removed bug Something isn't working labels Oct 18, 2023
@joe-p joe-p removed this from the Stable Release milestone Oct 18, 2023
@joe-p joe-p changed the title Pass arrays by reference to functions pass arrays by reference to functions Oct 21, 2023
@joe-p joe-p added this to TEALScript Oct 23, 2023
@joe-p joe-p changed the title pass arrays by reference to functions allow mutation of array arguments Nov 4, 2023
@joe-p joe-p moved this to Todo in TEALScript Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: TODO
Development

Successfully merging a pull request may close this issue.

1 participant