Knowledge Base

Variable Block

output-onlinepngtools__231_.png  This block works for both EV3 Robot and Ruby Robot!  output-onlinepngtools__101_.png


The Variable block provides the value of the selected variable. 

The initial value of the variable is first set by the Declare Variable block.

The value of the variable can be changed at any point in a program using the Set Variable block

To apply the Variable block to a program:

  1. Add a Variable block to the program from the block library. 
  2. From the block's drop-down menu, select the desired (previously declared) variable. 



Parameter Description

Provides the value of the selected variable. Can be used in place of a data block.


See also:

Declare Variable Block 

Set Variable Block

Was this article helpful?
1 out of 1 found this helpful


Please sign in to leave a comment.