ipints()
[Ip interpreter subroutine.]
const ASIZE=50;
safe r,i^,i,j,C.
global I[ASIZE],V[ASIZE],V,r,i^,i,j,C.
(1) [Factor (F command).]
if C=='F' then
{ if r>=1 then ipfac(r,I[i];s,c,L) else
{ B=iabsf(I[i]); ilwrit(ifact(B)); emptob; return };
n=length(L); if i^+n>ASIZE then { u#=OUNIT; OUNIT=6;
print "item array full; automatic cycling occurring";
i^=0; OUNIT=u# };
clout("sign="); awrite(s);
clout(" integer content=");
iwrite(c); emptob; while L ne () do
{ adv(L;M,L); i^=i^+1;
adv2(M;e1,I[i^],M);
clout ("multiplicity = "); awrite(e1);
clout (" factor = I");
cwrite('('); awrite(i^); cwrite(')');
emptob;
ipsw(I[i^],V[i]); V[i^]=V[i] };
return };
(2) [Product (* command).]
if C=='*' then
{ if i^==ASIZE then { OUNIT=6; print "item array full";
return }; i^=i^+1;
I[i^]=ipprod(r,I[i],I[j]); V[i^]=V[i];
clout("product = I"); cwrite('('); awrite(i^);
cwrite(')'); emptob;
ipsw(I[i^],V[i^]); return };
(3) [Sum (+ command).]
if C=='+' then
{ if i^==ASIZE then { OUNIT=6; print "item array full";
return }; i^=i^+1;
I[i^]=ipsum(r,I[i],I[j]); V[i^]=V[i];
clout("sum = I"); cwrite('('); awrite(i^);
cwrite(')'); emptob;
ipsw(I[i^],V[i^]); return };
(4) [Difference (- command).]
if C=='-' then
{ if i^==ASIZE then { OUNIT=6; print "item array full";
return }; i^=i^+1;
I[i^]=ipdif(r,I[i],I[j]); V[i^]=V[i];
clout("difference = I"); cwrite('('); awrite(i^);
cwrite(')'); emptob;
ipsw(I[i^],V[i^]); return };
(5) [GCD (G command).]
if C=='G' then
{ if i^==ASIZE then { OUNIT=6; print "item array full";
return }; i^=i^+1;
IPGCDC(r,I[i],I[j];I[i^],c##,d##); V[i^]=V[i];
clout("gcd = I"); cwrite('('); awrite(i^);
cwrite(')'); emptob;
ipsw(I[i^],V[i^]); return }..