Skip to content

array name could be a constant #250

Closed

Description

@x87

currently this code does not compile:

const arr = 1@
arr(0@,1i) = 0

this code, however, does:

int arr[1]
arr[0@] = 0

https://github.com/sannybuilder/dev/wiki/Grammar#arrays

Activity

  1. x87 commented on Sep 17, 2023

    @x87
    CollaboratorAuthor

    also works with opcode

    0004: arr(0@,1i) = 0
    
  2. added this to the v3.9.1 milestone on Sep 17, 2023
  3. x87 commented on Oct 15, 2023

    @x87
    CollaboratorAuthor

    does not work with float and string arrays

    const arr = 1@
    arr(0@,1f) = 0.0
    
    const arr = 1@
    arr(0@,1s) = ''
    
  4. reopened this on Oct 15, 2023
  5. modified the milestones: v3.9.1, v4.0.0 on Oct 15, 2023
  6. x87 commented on Aug 7, 2024

    @x87
    CollaboratorAuthor

    fixed in 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p3scope:compilertype:nice-to-have

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions