Enter a number that you would like to have squared (multiplied by itself)

Expressions provide an easy method to evaluate a simple Automate BASIC expression right inside a step's parameters instead of writing an entire BASIC script. Expressions work by taking the text found between percentage signs and passing it to the Automate BASIC expression interpreter. The result of the expression is then returned and replaces the expression (including the percentage signs) at runtime.

This task provides the user the ability to enter a number that he/she would like to have squared (multiplied by itself). To perform this operation, we first create the variable which will contain the user's response to the question (What number to square?), then we display the question using the Input Box action, this step will populate the variable specified with the answer. In the last step, we simply display the result by use of an Expression multiplying the variable by itself.

Task Category:

Functions (Basic)