dotnet / dotnet/vblang

[Proposal] Set operations on collections using []

Open
#558 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

In additions to #556 , these is some more `[]` operations:
```
Dim x = {1, 2, 3}
Dim y = {2, 1, 0}
Dim z = x[] + y[] ' z = {3, 3, 3}
z = x[offset:= 1 default:= 0] + y[] ' z = {4, 4, 0}
z[count:= 5 default:= 1] = x[] * y[] ' z = {2, 2, 0, 1, 1}
```

Just by using Offset, count, default in `[]`, we can control how the loop is done and how the results are stored.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.