Here is an example of a script which illustrates the topics discussed to this point. It uses variables. It inputs some text from the user. And it performs math. Make a file called arith.rex containing the following text:
/* This script inputs a number and does some calculations with it */

/* Get the original number from the user
   and put it into the variable named "a" */
SAY 'Enter a number'
PULL a
/* Calculate the square, and put it into a variable
   named "b". We could also have done a**2 */
b=a*a
/* Calculate the reciprocal,
   and put it into a variable named "c" */
c=1/a
/* Calculate 3 + original number,
   and put it into a variable named "d" */
d=3+a
/* Calculate two to the power of one less than the number,
   and put it into a variable named "e" */
e=2**(a-1)
/* Display those variables' values */
SAY 'Results are:' a b c d e

Run this REXX script. It will wait for you to type in a positive integer. Do that, and then press ENTER. Here is a sample run:

Type a number >
5
Results are: 5 25 0.2 8 16
The results you see are the original number typed by the user (5), its square (25), its reciprocal (0.2), the number plus three (8), and two to the power of one less than the number (16).