Skip to content

Version 0.4.0

Choose a tag to compare

@HogeyDev HogeyDev released this 14 Nov 23:52
· 23 commits to master since this release

Arrays

Arrays have been nearly fully implemented. Eventually, I intend on looking further into slices and seeing what kind of changes can be made to the existing array data type that closer match that of a slice.

  • Arrays can be created with [] in front of any data type
  • Ex: let cool_string: []char;
  • Adding a number between the brackets creates an array of fixed size
    • Ex: [256]int
  • Arrays can be indexed with brackets as well
    • Ex: my_cool_array[4] returns the element at index four of my_cool_array.