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

Range types are unimplemented #21

Open
egroge opened this issue Sep 9, 2020 · 0 comments
Open

Range types are unimplemented #21

egroge opened this issue Sep 9, 2020 · 0 comments
Labels
deferred Not a current priority enhancement New feature or request ewasm Code generation for the eWASM system for Ethereum move ir Code generation for Libra

Comments

@egroge
Copy link
Collaborator

egroge commented Sep 9, 2020

The following is taken from the flint guide:

Range types unimplemented

Flint includes two range types, which are shortcuts for expressing ranges of values. These can only be used with for-in loops.

The half-open range (a..<b) defines a range that runs from a to b, but does not include b.

for let i: Int in (0..<5) {  
 // i will be 0, 1, 2, 3, 4 on separate iteratons}  

The open range operator (a...b) defines a range that runs from a to b and does include b.

for let i: Int in (0...5) {  
 // i will be 0, 1, 2, 3, 4, 5 on separate iteratons}  

At the moment, both a and b must be integer literals, not variables!

Planned feature > > In the future, it will be possible to iterate up to an arbitrary value. See flintlang/flint#397.

@egroge egroge added enhancement New feature or request move ir Code generation for Libra ewasm Code generation for the eWASM system for Ethereum deferred Not a current priority labels Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deferred Not a current priority enhancement New feature or request ewasm Code generation for the eWASM system for Ethereum move ir Code generation for Libra
Projects
None yet
Development

No branches or pull requests

1 participant