Knowledge Base

Declare Variable Block

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

 

mceclip0.png

The Declare Variable block declares a variable!

To apply the block to a program: 

  1. Define a name for the variable. Choose short, meaningful names with no spaces or symbols.
  2. Select the variable type (integer, double, String, boolean).
  3. Define the initial value of the variable in the Numerical Data Block at the end of the block.

 declare_var_ENG.gif

 

Configuration

Parameter Description Compatible Blocks Range
declare

The name of the variable.

N/A

N/A
as

The variable type (integer, double, String, boolean).

 N/A

N/A
to be The initial value of the variable.

0 to ∞ 

 

See also: 

Variable Block

Set Variable Block

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

Comments

Please sign in to leave a comment.

Powered by Zendesk