TEXT(The PHOENICS Calculator REAL(XX,AA,BB,CC,ARG) INTEGER(ICASE) XX=0;AA=0;BB=0;CC=0;ICASE=0 LABEL TOP NOWIPE=T #CLs mesg( The PHOENICS calculator mesg( mesg( Which formula please? mesg( mesg( 1> x = a + b mesg( 2> x = a - b mesg( 3> x = a * b mesg( 4> x = a / b mesg( 5> x = a ** b mesg( 6> x = sin(a) with a in degrees mesg( 7> x = cos(a) " " " " mesg( 8> x = tan(a) " " " " mesg( 9> x = exp(a) mesg( 10> x = ln(a) ie log to the base e mesg( 11> x = 1.0/a mesg( 12> x = square_root(a) mesg( 13> x = a * b /c readvdu(icase,int,0) mesgm(formula is number :icase: mesg(a = :aa: OK? If not, please type required value of a readvdu(aa,real,aa) mesg(a=:aa: mesg(b = :bb: OK? If not, please type required value of b mesg(Please type value of b readvdu(bb,real,bb) mesg(b=:bb: if(icase.ge.13) then mesg(c = :cc: OK? If not, please type required value of b mesg(Please type value of c readvdu(cc,real,cc) mesg(c=:cc: endif arg=aa*3.14159/180 case icase of when 1 xx=aa+bb when 2 xx=aa-bb when 3 xx=aa*bb when 4 xx=aa/bb when 5 xx=aa**bb when 6 xx=sin(arg) when 7 xx=cos(arg) when 8 xx=tan(arg) when 9 xx=exp(aa) when 10 xx=log(aa) when 11 xx=1.0/aa when 12 xx=aa**0.5 when 13 xx=aa*bb/cc when 100 abort endcase mesg(The value of x is :xx: , when a = :aa: and b = :bb: mesg(Any more formulae? (y/n) readvdu(ans,char,n) if(:ans:.eq.y) then mesg(set a = just-calculated x ? readvdu(ans,char,n) if(:ans:.eq.y) then aa=xx endif mesg(set b = just-calculated x ? readvdu(ans,char,n) if(:ans:.eq.y) then bb=xx endif goto top endif abort