CALC fixed by pooq

dim a$(1),b$(1)
do
input""e$
if""=e$ end
n=token(e$,a$(),"+-*")
m=token(e$,b$(),"0123456789")
t=val(a$(1))
?t;
for i=1to m
c=val(a$(i+1))
d$=b$(i)
?" ",d$," ",c;
if"+"=d$t=t+c
if"-"=d$t=t-c
if"*"=d$t=t*c
next
?" = ",t
loop

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page