A list can store multiple values like numbers or texts also called "list-entries"

At the beginning, each list has 0 values. You can add/remove as much values as you like using the corresponding list commands.

 

You can imagine a list like on a sheet of paper:

1. Apple

2. Banana

3. Orange

4. Pinapple

5. Chocolate

 

Thats a list with 5 entries like for shopping. Each list-entry has a unique position like "Banana" is at position "2".

It is exactly the same like with lists in VN Maker. The only difference is that a list in VN Maker always starts with "0" as the first position instead of "1". Our above list in VN Maker would look like this:

0. Apple

1. Banana

2. Orange

3. Pinapple

4. Chocolate

 

A list is dynamic, same like on a sheet of paper, we can add new entries to our list or remove existing ones any time. If we remove a list-entry on a sheet of paper, we would probably just strikethrough the list-entry but in VN Maker the list-entry really gets completely removed and the position of all list-entries gets corrected. So if we take a look at our list above, if we remove the "Orange" entry the list would look like this:

0. Apple

1. Banana

2. Pinapple

3. Chocolate

 

As we can see, "Pinapple" is no longer at position "3" but at "2" now.

 

In VN Maker, we can add 4 different kind of values to a list: Numbers, Texts, Switches and even other Lists. For example: Our list above only contains text-values. Like already mentioned before, a list can also contain another list which is also called "Nested Lists" which would look like this on a sheet of paper:

0. Fruits

    0. Apple

    1. Banana

    2. Orange

1. Sweets

    0. Chocolate

    1. Cake

However, nested lists are an advanced topic. To see lists in action, check out the "List Example".

 

Add to List

Appends a new value to the list.

 

 

Insert into List

Inserts a new value at the specified index of the selected list.

 

 

Remove from List

Removes the value at the specified position from the list.

 

 

Pop from List

Removes the value at the end of the selected list and stores it into the specified variable.

 

 

Shift from List

Removes the first value of the selected list and stores it in the specified variable.

 

 

Get from List

Gets the value at the specified position from the selected list and stores it in the specified variable.

 

 

Find in List

Searches the selected list for the specified value. The search is flat, means it will not search in nested lists.

 

 

Set in List

Sets the value of the list at the specified position. It doesn’t add a new value to the list, it just sets the value at the specified position.

It can be compared like if we erase a list-entry with a rubber and then write something different at that position.

If the length of the list is smaller then the specified position, like if the position is 5 but the list only haas 3 entries, the list is automatically expanded to reach the correct length.

 

 

Shuffle List

Shuffles the list like if you have a list of cards you can use this command to shuffle the cards.

 

 

Sort List

Sorts the specified list like if you have a list of names you can use this command to sort the names ascending or descending.

 

 

Clear List

Removes all elements from the specified list. After that command has been executed, the specified list is empty.

 

 

Length of List

Gets the current length of the selected list and stores it into the selected number variable.

 

 

Copy List

Copies the list and pastes it into another list.

It can be compared like if you have one list on one paper and then grab a new paper and write the exactly the same list-entries on it.

In the end you have two independent lists: The original and the copy.

 

 

Join List

Converts a list into a Text by appending all list entries together using a specified separator character.

 

 

Text to List

Converts a Text into a List by splitting the text at a specified character such as a comma, semicolon, etc.