You are here:

The previous lesson walked you through setting up a development environment; here we will take a closer look at the Calculator.fx source code. The code in red below declares the program's script variables. Script variables are declared using the var or def keywords. The difference between the two is that var variables may be assigned new values throughout the life of the script, whereas def1 variables remain constant at their first assigned value. Here we have assigned some values to numOne and numTwo, but have left result uninitialized because this variable will hold the result of our future calculations: