PS TEXT EDIT Reference Manual
REGION
TEDIT Topics
2–56 058059 Tandem Computers Incorporated
A REGION is a text item that includes all the characters between the cursor
and the region boundary created by the DEFINEREGION command as
shown in Figure 2-5.
Figure 2-5. A REGION Beyond Your Terminal Screen
All text in this area
is a region.
The cursor's position
when you enter the
DEFINEREGION
command
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.
Here is another program that finds the largest of three numbers;
it is written in the Tandem programming language called TAL.
PROC yourproc MAIN; ! Name of the procedure
BEGIN
INT num1 := 5, ! Assign 5 to num1
num2 := 7, ! Assign 7 to num2
num3 := 4, ! Assign 4 to num3
maxnum; ! The variable where you
store values
IF num2 > num1 ! If 7 is greater than 5,
1) $PROG.SAMPLE.BASTAL 12/35 1:79 B30.
ELSE maxnum := num1; ! else, assign 5 to maxnum.
IF num3 > maxnum ! If 4 is greater than maxnum,
THEN maxnum := num3; ! then assign 4 to maxnum.
END; ! The end of "yourproc"
! procedure.
NEW NUMBERS
100 LET a = 1
200 PRINT a
300 LET b = 1
400 PRINT b
500 LET C = a + b
600 PRINT c
700 LET a = b
800 LET b = c
900 IF c < 100 THEN GOTO 500
! 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.
The cursor's position
when you enter a
command using
REGION