TGAL Manual

TGAL Procedures
Tailoring TGAL
4–8 060865 Tandem Computers Incorporated
T^OUTLEN,
T^OUT,
T^OV,
T^PAGELEN,
T^PAUSE,
T^POFF,
T^SECT,
T^SEQ,
T^SET,
T^SHORT,
T^SPACE,
T^SUBHEAD,
T^TAG,
T^TEXT,
T^TODAY,
T^TOP^MARGIN,
T^TRANSPARENT,
T^TRIGGER,
T^UPSHIFT,
T^USA,
T^VERSION,
T^WORLD,
0
];
6, "OUTLEN",
3, "OUT",
2, "OV",
7, "PAGELEN",
5, "PAUSE",
4, "POFF",
4, "SECT",
3, "SEQ", ->
3, "SET",
5, "SHORT",
5, "SPACE",
7, "SUBHEAD",
3, "TAG",
4, "TEXT",
5, "TODAY",
9, "TOPMARGIN",
11, "TRANSPARENT",
7, "TRIGGER",
7, "UPSHIFT",
3, "USA",
7, "VERSION",
5, "WORLD",
!---------------------------------------------------------------------!
! DO NOT CHANGE ANYTHING BEYOND HERE. !
!---------------------------------------------------------------------!
! Upshift the potential word into the buffer. Do only 20 bytes !
! since that is more than enough. !
!---------------------------------------------------------------------!
USE i; ! loop index !
FOR i := 0 TO 19 D0 ! for each char !
BEGIN ! !
buffer[ i ] := IF $ALPHA(str[ i ]) THEN ! if its alpha then shift !
str[ i ] LAND %337 ! and move !
ELSE ! if not alpha then !
str[ i ]; ! just move to buffer !
END; ! end of move and upshift !
! !
i := 0; ! !
WHILE (rswdtext[ i ] <> 0) D0 ! scan the list looking !
BEGIN ! for the keyword !
IF (buffer = rswdtext[ i+2 ] FOR rswdtext[ i+1]) THEN! !
BEGIN ! if found then !
RETURN (rswdtext[ i ]); ! return its index !
END; ! !
i := i + rswdtext[ i+1 ] + 2; ! else step to next one !
END; ! end of search loop !
! !
RETURN (0); ! search failed, return 0 !
END; ! INT PROC reserved^word !