Reporter Block

A **reporter block** is a block that reports a value. These can be anything, from numbers to strings. Unlike a stack block, which changes something on the Stage, plays a sound, stops the script, or changes a variable, reporter blocks cannot be placed directly above or below another block. Instead, they are dropped into a number, text, or drop-down input; then when Scratch runs the block into which the reporter block has been dropped, it will first run the reporter block to find the value of the input. Reporter blocks can have inputs too, which may themselves be other reporter blocks. Boolean Blocks are a special kind of reporter block that reports either "true" or "false".

To quickly view the value of a reporter, simply click it in the editor and Scratch will display the value in a small bubble.

## Shape

This is an example of a Reporter Block:

<scratchblocks>(x position)</scratchblocks>

As reporter blocks report values, they are designed to fit wherever a value is needed. This can be anywhere: many blocks have spaces (parameters) within them or drop-down menus capable of inputting reporter blocks. For example:

<scratchblocks>glide () secs to x: () y: ()</scratchblocks>

This block can easily be filled with Reporter blocks:

<scratchblocks>glide (costume [number v]) secs to x: (y position) y: (x position)</scratchblocks>

## Use

As reporter blocks report values, they are used whenever a script needs a certain value. These values can be anything

 from X positions to the costume number of a sprite. Reporter blocks also need another block to work; they cannot stack like stack blocks.

For example, compare these two scripts:

<scratchblocks>
when gf clicked
say [Hello,] for (1) seconds:: looks
say [Gobo!] for (1) seconds:: looks

when gf clicked
say [Hello,] for (1) seconds:: looks
say (username) for (1) seconds:: looks
</scratchblocks>

In the first script, the message is predetermined. In the second script, a reporter block has been dropped into the first input of <sb>say [] for () seconds:: looks</sb>, and so the message depends on the value of <sb>username</sb>.

Because reporter blocks have inputs which may themselves be reporter blocks, <sb>join [][]</sb> can be used to show the same message, but all at one time:

<scratchblocks>
when gf clicked
say (join [Hello, ] [Gobo!]) for (2) seconds

when gf clicked
say (join [Hello, ] (username)) for (2) seconds
</scratchblocks>

## Blocks

There are 34 normal reporter blocks in Scratch 3.0 and 15 extension blocks, for a total of 49.

### Motion

* <sb>x position</sb>
* <sb>y position</sb>
* <sb>direction</sb>

### Looks

* <sb>costume [ v]</sb>
* <sb>backdrop [ v]</sb>
* <sb>size</sb>

### Sensing

* <sb>distance to ( v)</sb>
* <sb>answer</sb>
* <sb>mouse x</sb>
* <sb>mouse y</sb>
* <sb>loudness</sb>
* <sb>timer</sb>
* <sb>[ v] of ( v)::sensing</sb>
* <sb>current [ v]</sb>
* <sb>days since 2000</sb>
* <sb>username</sb>

### Operators

* <sb>() + ()</sb>
* <sb>() - ()</sb>
* <sb>() \* ()</sb>
* <sb>() / ()</sb>
* <sb>pick random () to ()</sb>
* <sb>join [] []</sb>
* <sb>letter [] of []</sb>
* <sb>length of []::operators</sb>
* <sb>() mod ()</sb>
* <sb>round ()</sb>
* <sb>[ v] of ()::operators</sb>

### Variables

* <sb>(variable)</sb>
* <sb>(list::list)</sb>
* <sb>item [] of ( v)</sb>
* <sb>length of ( v)::list</sb>
* <sb>item # of [] in ( v)</sb>

### Translate

* <sb>translate () to ( v)</sb>
* <sb>language</sb>

### LEGO BOOST

* <sb>motor ( v) position::boost</sb>
* <sb>tilt angle ( v)::boost</sb>
* <sb>(motor ( v) distance::boost)</sb>

### LEGO MINDSTORMS EV3

* <sb>motor ( v) position::ev3</sb>
* <sb>distance::ev3</sb>
* <sb>brightness</sb>

### LEGO Education WeDo 2.0

* <sb>distance::wedo</sb>
* <sb>tilt angle ( v)::wedo</sb>

### Go Direct Force and Acceleration

* <sb>force</sb>
* <sb>tilt angle ( v)::gdxfor</sb>
* <sb>spin speed ( v)</sb>
* <sb>acceleration ( v)</sb>

de:Blockform = Wert-Blöcke
id:Balok Pelapor
ja:値ブロック
es:Bloque valor