Variable Block

Variable Block

Where Is It?

The variable block is located in the Variables drawer of the Blawx toolbox.

What Does It Do?

The variable block is used to create an unknown, and give it a name. Any time the same variable name is used inside the same scope, Blawx will return answers only where those statements are true when the same object is used in all of those places.

Note that the opposite is not true. Blawx does not guarantee that variables with different names refer to different objects. To force it to do that, you need to use an object disequality block.

Technical Details

The variable block requires you to enter a variable name into the text field.

To be valid, a variable name must

  • contain only numbers, underscores, and letters
  • begin with an uppercase letter
  • not end in an underscore followed by only digits

The block will automatically remove leading and trailing spaces, convert spaces to underscores, and convert an initial lowercase letter into uppercase. Other invalid values will be rejected, and the value of the field will not be changed.

The variable block can be entered anywhere an object or a value is expected.


The actual names given to your variables are meaningless to Blawx, but they can be helpful to the reader of your encoding. A variable name like "X" will work perfectly well for answering questions, but a variable name like "Winner" might be more helpful for making it obvious why a rule or question was written the way it was.