Mixly Block Category - Lists
Contents
Create List
Creates a List. Lists are a collection of variables. Access to each variable is done by the index number. This allows accessing variables simple with a counter that increments to go through an entire List.
- List Type - This defined the data type that the List will hold. There are choices between int (for integers), float (for decimal numbers), and char (for characters).
- List Name - This is the name of the List. The List's name is used in other blocks to access the List. The name is arbitrary.
- List Size - The size of the list allows 3 variables by default. But this can be configured. Click on the gear icon to add or remove the number of items by dragging items into or out of the List object.
With Blocks
Data can be initialized to the List by dragging their blocks into the List. Variables can be added to the List.
With Text
List can also be define in text format. Instead of individually snapping blocks to the List construction. A specialized string of text (basically code) will define the List. The format is item1, item2, item3, item4
Read more here: https://www.arduino.cc/en/Reference/Array
List Length
Returns the length or the number of elements in the List. The input is the name of the List. As defined during the construction / initialization of the list.
Read more here: https://www.arduino.cc/en/reference/sizeof