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

[request] support for fixed length arrays #32

Open
antis81 opened this issue May 17, 2021 · 0 comments
Open

[request] support for fixed length arrays #32

antis81 opened this issue May 17, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@antis81
Copy link
Contributor

antis81 commented May 17, 2021

Defining static arrays is an issue using the !rept. meta when the array label is local. Example:

a_scope:  <-- Trying to define local "a_scope.arr[idx]" labels (actually this is a "__macro_<id>" label in my case)
  .arr:  ; <-- should have indexed .arr[<i>] labels
  !rept 5 { 
    ; note: scope is now "__rept_<id>"
    .arr[i]: !byte 0  ; results in "__rept_<id>.my_arr[<i>]" label -> practically invisible
  }

A solution to this could be a new !array meta command:

a_scope:
  !array .arr, 5  ; defines "a_scope.arr"
  {
    .arr[i]: !byte 0  ; defines "a_scope.arr[<i>]
  }

… or (probably better) we could allow explicit definition of sub labels:

a_scope:
  !rept 5 {
    a_scope.arr[i]: !byte 0  ; currently a syntax error
  }
@sasq64 sasq64 added the enhancement New feature or request label May 6, 2023
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

2 participants