Skip to content

Add arrays #6

Description

@zoeyfyi

The array syntax should be as follows

# Defines a length 5 int array
int[5] foo = {1, 2, 3, 4, 5}

# Gets the 4th element in the array
foo[3]

# Returns a slice of the 2nd to 4th elements
foo[1:3]

# Returns foo array as a vector
int<5>(foo)
  • Array definition
  • Array value by index
  • Array set value at index
  • Array to slice
  • Array to vector

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions