Revision as of 13:33, 9 July 2019 by TemplatesFTW (talk | contribs) (Automated edit: fixed 3 style guidelines)

An image of a list and example content

A list (also called an array in other programming languages) is a tool that can be used to store multiple pieces of information at once. It can also be defined as a variable containing multiple other variables. A list consists of a numbers paired with items. Each item can be retrieved by its paired number. List blocks can be found in the Data blocks palette.

List Blocks

Main article: List Blocks

The following blocks can be used to program lists:


An image of an empty list

Items can be added to or deleted from a list manually or by programming. Holding down shift and pressing enter on a list results in a new entry above the previously selected entry, and pressing enter without the shift key creates a list entry below the previously selected one. They can also be added by right-clicking the list, clicking 'import', and selecting a plain .txt or Comma Separated Values file. Each line in the file will become a new item in the list.
They can also be exported in the same way; however, it is not possible to do so if the list has a name which is unsupported in the user's operating system. In Windows, lists using question marks, asterisks (*), angle brackets (< >), pipes (|), a colon (:), a space ( ), or any ASCII control character cannot be exported with Scratch. The first time the export button is pressed for this type of list, nothing will happen; following the second click, the import/export menu will close.[1][2] The allowed characters will vary between operating systems.

Limits on list size

Document.png Please expand this article or section. You can help by adding more information if you are an editor. More information might be found in a section of the talk page. (July 2019)

In Scratch 3.0, Lists have a size limit of 200,000 items.[3]

Example Uses

Some example uses for lists are as follows:

More Complex Uses

  • Storing user-input data in Operating System simulations
  • Storing AI data in games
  • Allowing users to re-create past inputs

Copy and pasting

Because text in lists can be copied and pasted into text documents, and the data in lists can also be exported or imported, lists can be used to create save systems (along with the Ask () and Wait block).

Cloud Lists

Main article: Cloud Data

Cloud lists were an experimental feature in alpha and beta versions of Scratch 2.0. However, they were disabled when Scratch 2.0 was released. The values of cloud lists were stored on the Scratch servers; this was the only difference between them and regular lists. When a cloud list got updated, it did so across all copies of the project. This makes cloud lists ideal for things like public high score lists. Many users wanted cloud lists to come back because it would make coding easier for them.[4]


Main article: Casting

Lists are cast to numbers and strings with a set of explicit rules depending on its contents.

List Editor

The Scratch list editor.

The List Editor is a feature that allows you to edit lists. It is only avalible inside the project editor. Use it by clicking on a list item and typing in the new list item. You can also delete an item by clicking the "X" at the right and add an item by clicking the "+" at the bottom left of the list area.


The list editor can be used to make Programming languages in Scratch by importing a *.txt file into the list. It is also useful when a project needs users to edit a list. The list editor is not as widely used as many other features such as Say and Ask. Many Scratchers do not know about the list; therefore, not many projects use it.[citation needed]

The list editor is also useful in text editors as creating a full text editor in Scratch is almost impossible because of the limitations of what characters can be used in the Key () Pressed? block. Text editors using list editors are easy to code as the project just has to access the list item.


The list editor has many limitations, which is why it is not widely used. It can only be used in the project editor, which means users can see all the code and edit it. Its use of Scratch features also means that it is hard on the user and is not customizable at all. List editors also do not have the best user interface, and it is often misleading for the user. Because of this, very few projects use the list editor and it is a very little-known feature.

Example Projects


From the time lists were introduced, many users requested two new blocks,hide list [list v] and show list [list v]. Due to such high demand, they were included in Scratch 2.0.

Some users have suggested adding two-dimensional, or even multidimensional lists.[5] The Scratch Team has yet to comment on that suggestion.[citation needed]

See Also


  2. yt:qTo6kYHStss
  4. post:744420
  5. topic:212876