A=DIIPSR(V)
$(DISTRIBUTED INTEGRAL POLYNOMIAL, SPECIAL READ. V IS A VARIABLE LIST
FOR A. MAY 17 79 DSA.)
SAFE SL,C,TL,EL,JL,RL.
(1) $(INITIALIZE A) A=(). C=CREADB().
IF C EQ $=0 THEN
(C=CREADB(). IF C EQ $=$ THEN (A=0. RETURN)
ELSE (PRINT $(UNEXPECTED CHARACTER). GO TO 6) ).
(2) $(BEGIN NEXT TERM. ESTABLISH SIGN) TL=0. SL=1. AL=1. DL=().
IF C EQ $=- THEN (SL=-1. C=CREADB() )
ELSE IF C EQ $=+ THEN C=CREADB().
(3) $(ESTABLISH COEFFICIENT)
IF DIGIT(C) EQ 1 THEN
(TL=1. BKSP. AL=IREAD().
IF AL EQ 0 THEN
(PRINT $(ZERO COEFFICIENT). GO TO 6).
C=CREADB() ).
IF SL LT 0 THEN AL=INEG(AL).
(4) $(READ MONOMIAL, IF ANY) WHILE LETTER(C) EQ 1 DO
(TL=1. EL=1. BKSP. VL=VREAD(). JL=VLSRCH(VL,V).
IF JL EQ 0 THEN (PRINT $(UNKNOWN VARIABLE). GO TO 6).
C=CREADB().
IF C EQ $=* THEN
(C=CREAD(). IF C NE $=* THEN
(PRINT $(ERROR - SINGLE ASTERISK SEEN).
GO TO 6).
C=CREADB(). IF DIGIT(C) EQ 1 THEN
(BKSP. EL=IREAD(). IF EL GE BETA THEN
(PRINT $(EXPONENT TOO LARGE).
GO TO 6) )
ELSE
(PRINT $(ILLEGAL CHARACTER IN EXPONENT).
GO TO 6).
C=CREADB() ).
DVINS(JL,EL,DL.RL,DL). IF RL EQ 0 THEN
(PRINT $(VARIABLE OCCURS TWICE IN MONOMIAL).
GO TO 6) ).
(5) $(INSERT TERM IN A. DETERMINE NEXT ACTION.)
IF TL EQ 1 THEN (DPINS(AL,DL,A.RL,A). IF RL EQ 0 THEN
(PRINT $(MONOMIAL OCCURS TWICE). GO TO 6) )
ELSE
(PRINT $(UNEXPECTED CHARACTER). GO TO 6).
IF C EQ $=$ THEN RETURN.
GO TO 2.
(6) $(ERROR EXIT) DIBUFF.
PRINT $(READING THROUGH NEXT $).
WHILE C NE $=$ DO C=CREAD().
PRINT $(THE (CONSTANT) POLYNOMIAL 1 RETURNED).
A=LIST2(1,()). RETURN..