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

Make last argument to mid$ optional #47

Open
James-Livesey opened this issue May 15, 2023 · 0 comments
Open

Make last argument to mid$ optional #47

James-Livesey opened this issue May 15, 2023 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@James-Livesey
Copy link
Member

Like other implementations of BASIC, the length argument to mid$ should be optional to get the rest of a string from the starting index, just like substring in JavaScript.

Example (this should print ello:

10 print mid$("Hello", 1)

Currently, we get an Expected another argument to function error as mid$ expects three arguments.

Documentation will need changing to reflect the argument's optionality as well.

@James-Livesey James-Livesey added bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant