Eng:Item

An item is a part of a list that works in a similar way to a variable. Each list can theoretically hold an unlimited amount of items, though too many will probably crash Squeak.

An item can be any value supported by Scratch, such as a boolean (true or false), string, or number. An item cannot contain a list in Scratch, though in the Scratch Modification BYOB, it can. Lists of lists is a powerful way to store data, so there have been suggestions to include lists as a standard data type in Scratch 2.0 or create a new data type called "tables" which work like a spreadsheet.

Definition
An item is a lot like a variable. You can modify, read, and create items. Items of a list can be used to replace all the variables of a project. However it will not be as easy to read, as values will be referred to by numerical indices, not names.

Related Blocks
Nearly all of the List blocks, found in the Data palette, underneath the variables, can be used in conjunction with items:


 * Add to   Adds an item to the bottom of a list
 * Delete of   Removes an item from a list
 * Insert at  of   Adds an item to a list and puts it wherever specified
 * Replace Item of  With   Replaces an item's content
 * Item of   Reports what the item contains
 * Length of  Reports how many items are in a list
 * Contains  Checks if a list has an item that holds the given text

These blocks give more control over items than other blocks can with variables there are no blocks that will create or delete variables, except in some Scratch modifications.