(Redirected from Variable Blocks)
- "Orange blocks" redirects here. For light orange blocks, see Control Blocks.
- This article is about both Variables and List Blocks. For the subcategory, see Variables Blocks (subcategory). For the blocks that deal with lists, see List Blocks. For the block that stores variables, see () (Variables block).
Variables (known as Data in Scratch 2.0) is one of the ten categories of Scratch blocks. The variable blocks are color-coded orange, and the list blocks are color-coded dark red.
There are currently 17 Variables blocks: 11 Stack blocks, 5 Reporter blocks, and 1 Boolean block. There are 5 variable blocks and 12 list blocks.
Blocks
Note: | Click on a block to learn more about it. |
Variables
- Main article: Variables Blocks (subcategory)
Scratch 3.0 has the following 4 Variables Stack blocks:
set [variable v] to (0)
change [variable v] by (1)
show variable [variable v]
hide variable [variable v]
Scratch 3.0 has the following 1 Variables Reporter block:
Although there is only 1 variable reporter shown here, the possible number of reporters is infinite because a new one is created for each variable that is created.
List
- Main article: List Blocks
Scratch 3.0 has the following 7 List Stack blocks:
add [thing] to [list v]
delete (1) of [list v]
delete all of [list v]
insert [thing] at (1) of [list v]
replace item (1) of [list v] with [thing]
show list [list v]
hide list [list v]
Scratch 3.0 has the following 4 List Reporter blocks:
Scratch 3.0 has the following 1 List Boolean block:
See Also
Variables Blocks | |
List Blocks |