Eng:Argument

An argument is any area in a block that accepts user input, or another block. It could be a Boolean Block or a value placed inside of a variable or block.

Argument Types
The following are types of arguments in Scratch:

Numeric Insert
A numeric insert is an insert that only accepts numeric inputs, such as the number 10 or the decimal 3.2, or expressions with E notation, such as 10e5. These inserts are rounded in shape to show their difference from other types of inserts.

String Insert
A string insert is an insert that accepts all keyboard characters as inputs, so any value from the word "help" to the number 32 will be accepted. String inserts also accept boolean blocks, converting a "true" value into the string "true" and converting "false" values into the string "false". These inserts are rectangular but have a white background to differentiate them from drop-down inserts.

Drop-Down Insert
A drop-down insert is an insert that contains a string value that cannot be changed except by clicking the downwards arrow to the right. When the arrow is clicked, a menu of available options appears for the user to choose from. To choose an option, click the option you need. Sometimes, menus will be so long that they don't fit into the maximum space a drop-down takes, in which case a down arrow appears at the bottom and an up arrow appears at the top of the menu. When one hovers their mouse below or above these arrows, respectively, the menu scrolls down or up to show all the options. These inserts are rectangular and take the same background color as the block they are contained in.

Drop-down arrows can also be added to string or numeric inputs, to give easy access to common values in those inputs or to give access to values that cannot be there normally, such as the value "last" in the numeric input in the Item of  (block) or the various values in the numeric input in the Point in Direction  (block).

Boolean Insert
A Boolean insert is an insert that accepts only boolean blocks. Booleans report either true or false. Blocks that accept boolean inputs (such as If Then (block)) will do conditional actions based on the value reported. These inserts are in the shape of elongated hexagons, to correspond with the shape of boolean blocks.

Color Insert
A color insert is an insert that accepts color input. When a user clicks on the insert, the mouse changes into the "thumb" pointer and remains that way until the user clicks again in the editor. The color in the insert will correspond with the color that the mouse is touching when the mouse is clicked. These inserts are square in shape and are empty save their background, which is the color that the user chooses, i.e. the background color is the chosen color for the input.

Scratch internals
Each argument has a Squeak code. These are all available in the "Scratch-Blocks" category in the System Browser.

Types
The following are the types of arguments with their Squeak code:


 * AttributeArgMorph The first drop-down in the  of  Sensing block
 * BooleanArgMorph To insert a Boolean Block
 * ChoiceArgMorph A drop-down menu that does not allow reporter blocks to be dropped in
 * ChoiceOrExpressionArgMorph A drop-down menu that allows reporter blocks to be dropped in
 * ColorArgMorph A color insert
 * EventTitleMorph A broadcast
 * ExpressionArgMorph Either a number or string insert
 * ExpressionArgMorphWithMenu Either a number or string insert that has a dropdown menu; differs from ChoiceOrExpressionArgMorph in the fact that it can have something typed in
 * SpriteArgMorph  A sprite drop-down menu

There are other categories in Scratch-Blocks, but those are for block types.

Calling (Scratch 1.4)
Argument names are case-sensitive, and start with a letter. In the Scratch System Browser, they are prefaced with a "$" in the list, and "%" when being called. For example, %S is different from %s.


 * a Attributes in the  of  Sensing block
 * b A boolean insert
 * c A color menu that shows the palette
 * C A color menu that does not show the palette
 * d The direction menu in the Point in Direction  block
 * D The drum menu in the Play Drum  for  Beats block
 * e The broadcast list
 * f The functions in the  of  (Operators block)
 * g Graphic Effects list
 * H The drop-down in the  Sensor Value block
 * h The drop-down in the Sensor ? block
 * I The drop-down in the Set Instrument to  block
 * i The first drop-down in the Item  of  block
 * k The drop-down in the When  Key Pressed and Key  Pressed? blocks
 * L The list drop-down menu
 * l The drop-down in the Switch to Costume  block
 * m A sprite list; also used for other things


 * n A number insert
 * N The insert in the Play Note  for  Beats block
 * s A string insert
 * S The sound names for the drop-downs in the Play Sound  and Play Sound  Until Done blocks
 * v The variable drop-down menu
 * W The drop-down in the Motor Direction  block
 * y The insert in the Delete  of  block

Calling (Scratch 2.0)
Argument names are case-sensitive, and start with a letter. In the Scratch System Browser, they are prefaced with a "$" in the list, and "%" when being called. For example, %S is different from %s.


 * m.attribute Attributes in the  of  Sensing block
 * b A boolean insert
 * c A color menu that does not show the palette
 * d.direction The direction menu in the Point in Direction  block
 * d.drum The drum menu in the Play Drum  for  Beats block
 * m.broadcast The broadcast list
 * m.mathOp The functions in the  of  (Operators block)
 * m.effect Graphic Effects list
 * m.triggerSensor The drop-down in the  Sensor Value block
 * m.booleanSensor The drop-down in the Sensor ? block
 * d.instrument The drop-down in the Set Instrument to  block
 * d.listItem The first drop-down in the Item  of  block
 * d.listDeleteItem The first drop-down in the delete  of  block
 * m.key The drop-down in the When  Key Pressed and Key  Pressed? blocks
 * m.list The list drop-down menu
 * m.coustume The drop-down in the Switch to Costume  block
 * m.spriteOnly A sprite list; also used for other things
 * n A number insert
 * d.note The insert in the Play Note  for  Beats block
 * s A string insert
 * m.sound The sound names for the drop-downs in the Play Sound  and Play Sound  Until Done blocks
 * m.var The variable drop-down menu
 * m.motor The drop-down in the Motor Direction  block