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

Support loops of varying length #61

Merged
merged 3 commits into from
Feb 5, 2018
Merged

Support loops of varying length #61

merged 3 commits into from
Feb 5, 2018

Conversation

gmile
Copy link
Contributor

@gmile gmile commented Aug 21, 2017

Fixes #56

This code does not yet have tests. It does not account for the following corner cases:

  • a zero is passed as any of range Loop arguments,
  • max is less than min, e.g. range Loop 10 5 – this case is not handled,
  • a negative number is passed as any of range Loop arguments (I think it makes sense to use uint everywhere in range Loop),
  • a non-digit is passed as any of range Loop arguments,
  • three or more arguments are passed to range Loop (in fact, in case more than 2 args are passed – redundant args will be ignored),
  • an integer more than MaxInt is passed as any of range Loop arguments,
  • what will be if min = max?

lucapette added a commit that referenced this pull request Feb 5, 2018
@lucapette lucapette mentioned this pull request Feb 5, 2018
@lucapette lucapette merged commit a08037f into lucapette:master Feb 5, 2018
@gmile gmile deleted the issue-56 branch February 5, 2018 09:29
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 this pull request may close these issues.

2 participants