| link l="MPfile:w example.mp";
ring r=0,(x,y,z),ds;
ideal i=maxideal(3);
ideal j=x7,x2,z;
// compute i+j before writing, but not std
// this writes 'std(ideal(x3,...,z))'
write (l, quote(std(eval(i+j))));
option(prot);
close(l);
// now read it in again and evaluate
// read(l) forces to compute 'std(ideal(x3,...,z))'
read(l);
close(l);
|