Variables

BlocklyProp reference for VARIABLES blocks

Block availability varies by board type.


set variable

Compatible with all Propeller board types (except Scribbler Robot)

The set variable block allows you to assign an initial value to a variable. Once that is done, you can use this block to access any variable you have created to use it elsewhere in the program.

The variable named item is a system default. To create a variable:

  1. Click the new variable button at the top of the Variables menu, then type in a unique variable name and click OK. See About Naming Things for the rules.
  2. Click the set variable block to put it into your workspace.
  3. In the block’s dropdown menu, choose the name of the variable you created.
  4. Attach an initial value with either a number value block or a text string value block.

Now, any time you want to change the value of your variable in the program again, you can use this block and select its name from the item drop-down.  Your variable will also be accessible from any other block that has an item drop-down menu, such as the use variable block below.

See the Variable Blocks tutorial for an example activity.


use variable

Compatible with all Propeller board types (except Scribbler Robot)

The use variable block provides the value of the variable selected in the drop-down menu when inserted into other blocks. A use variable block will be created and visible in the Variables menu for each unique variable you create in a project.


wxConnldx variables

  Compatible with the Activity Board WX and Badge WX only.

These four default variables become available under the Variables menu when the COMMUNICATE > WX Module > Advanced > Advanced WX connect block is placed into the BlocklyProp workspace.


wxEvent

  Compatible with the Activity Board WX and Badge WX only.

This default variable becomes available under the Variables menu when the COMMUNICATE > WX Module > Advanced > Advanced WX poll block is placed into the BlocklyProp workspace.


wxHandle variable

  Compatible with the Activity Board WX and Badge WX only.

This default variable block becomes available under the Variables menu when certain COMMUNICATE > WX Module > Advanced blocks for data handling are placed in the BlocklyProp workspace.


wxld variable

  Compatible with the Activity Board WX and Badge WX only.

This default variable block become available under the Variables menu when certain COMMUNICATE > WX Module > Advanced blocks that perform data handling are placed in the BlocklyProp workspace.