Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

103 range operation#105

Merged
skx merged 9 commits intomasterfrom
103-range-operation
Jan 29, 2020
Merged

103 range operation#105
skx merged 9 commits intomasterfrom
103-range-operation

Conversation

@skx
Copy link
Owner

@skx skx commented Jan 28, 2020

Implement foreach support:

// Show the array
foreach item in [ "Steve", "Kemp" ] {
   print( "This is the element: ", item, "\n");
}

return false;

We don't get access to the index, but we do get the value. We could fix that later if we need it. This will fix #103 once merged - but note we have also changed the handling of OpCall, as per #86, and that needs to be fixed next.

@skx
Copy link
Owner Author

skx commented Jan 28, 2020

TODO: Test-cases.

@skx skx merged commit 0c7d548 into master Jan 29, 2020
@skx skx deleted the 103-range-operation branch January 29, 2020 05:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We should support a range operation.

1 participant