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

Reading array elements #6935

Open
10 tasks
izveigor opened this issue Jul 12, 2023 · 0 comments
Open
10 tasks

Reading array elements #6935

izveigor opened this issue Jul 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@izveigor
Copy link
Contributor

izveigor commented Jul 12, 2023

Is your feature request related to a problem or challenge?

Any element of the array must be read. There are two ways to take elements from an array: through functions and through indices.
Functions:
Let's introduce two functions for reading one element and element range:

  • array_element(array, i) (read one element);
  • array_slice(array, i, j) (read element range);

Index improvements:

  • additional key for slices (array[i:j]);
  • multiple index support (array[0][0][0][0])
  • negative indices (single: array[-1])
  • negative indices (multiple: array[-1:-2]);
  • support for names indexes (single: array[a]);
  • support for names indexes (multiple: array[a:b])
  • arithmetic operations within an index (single: array[1 + 2:])
  • arithmetic operations within an index (multiple: array[1 + 2:3 + 4])

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant