Skip to main content

Variables and Arithmetic

Loading...

This project is the first one that "gives you a reason" to open the Features tab. Nested between the Hardware configuration and AppBlocks (dynamic behavior) tabs, the Features tab comprises a collection of pages that define everything that is permanent in your project. Your application's variables are one such entity in the sense that variables are not created and deleted dynamically but exist as a static list.

To add, delete, or edit the list of variables, turn to the Variables page of the Features tab:

variable

AppBlocks supports four fundamental variable types:

  • Numerical (single-precision floating point), a.k.a. a "value" or a "number" type
  • String (up to 253 single-byte characters)
  • Date Time (1-second resolution)
  • Date

A few other variable types exist elsewhere in the system, but only these four are explicitly available.

Once you have at least one numerical variable, you can perform arithmetic operations on this variable using the Arithmetic block. In this simple application, the value of the Counter variable is incremented and printed to the console every time you press the MD button. To see or edit the block's contents, click on the block to open its properties:

arithmetic

The MD button was introduced in the Hello, World project.