' ****************************************************************************
' Description: Tutorial 4, Arithmetic Operations. Shows how to use operators
' and expressions to do simple math
' Author: Jim KN6PE
' Revision: 10/03/08: Original
' ****************************************************************************
SCRIPT
Var X as NUMBER ' Define a variable "X"
BEGIN
X = 0 ' initially set X = 0
X = X + 1 ' add 1 to X
Print("The result is " & x) ' the result should be 1
X = X*5+10 ' x was 1 from the previous calc
Print("Calc'ed as " & x) ' now, the result should be 15
X = X*(5+10) ' x was 15 from the previous calc
Print("Math in parens: " & x) ' now, the result should be 225
END