PS TEXT EDIT Reference Manual
REGION
TEDIT Topics
058059 Tandem Computers Incorporated 2–55
REGION
Figure 2-4. The Concept of a REGION
This is how to write a program that prints the values produced by
the Fibonacci series that are less than 100, using the
programming language called BASIC. The first two numbers are
1,1; all subsequent numbers are the sum of the preceding two
numbers in the series.
NEW NUMBERS
100 LET a = 1
200 PRINT a
300 LET b = 1
400 PRINT b
500 LET C = a + b
600 PRINT
700 LET a = b
800 LET b = c
900 IF c < 100 THEN GOTO 500
Here is another program that finds the largest of three numbers;
it is written in the Tandem programming language called TAL.
PROC yourproc MAIN;
BEGIN
INT num1 := 5,
num2 := 7,
num3 := 4,
maxnum;
IF num2 > num1
ELSE maxnum := num2;
ELSE maxnum := num1;
! Program name !
! Assign 1 to a !
! Print the value of a !
! Assign 1 to b!
! Print the value of b !
! Assign a and b's value to c !
! Print the value of c !
! Assign a's value to b !
! Assign b's value to c !
! If c's value is less than 100,
! then go to statement 500.
! Name of the procedure
! Assign 5 to num1
! Assign 7 to num2
! Assign 4 to num3
! The variable where you
store values
! If 7 is greater than 5,
! else, assign 5 to maxnum.
! If 4 is greater than maxnum,
This area is a region.
The other end of
the region
One end of a region