Annotation of OpenXM/src/ox_maple/oxmpl.rr, Revision 1.1
1.1 ! iwane 1: /* $OpenXM$ */
! 2: /*
! 3: * OpenXM Maple Server
! 4: *
! 5: * [1215] PID = ox_launch(0, "$OpenXM/src/ox_maple/ox_maple");
! 6: * 0
! 7: * [1216] ox_cmo_rpc(PID, "func", "resultant", x^2+a*x+b, 2*x+a, x);
! 8: * 0
! 9: * [1217] maple.whattype(PID);
! 10: * `+`
! 11: * [1218] ox_pop_cmo(PID);
! 12: * -a^2+4*b
! 13: * [1219] maple.resultant(PID, x^2+a*x+b, 2*x+a, x);
! 14: * -a^2+4*b
! 15: * [1220] ox_cmo_rpc(PID, "sleep", 10);
! 16: * 0
! 17: * [1221] ox_execute_string(PID, "resultant(x^2+a*x+b, 2*x+a, x);");
! 18: * 0
! 19: * [1222] ox_pop_cmo(PID);
! 20: * -a^2+4*b
! 21: *
! 22: */
! 23:
! 24:
! 25: module maple;
! 26:
! 27: localf resultant$
! 28: localf whattype$
! 29:
! 30:
! 31: def resultant(PID, F1, F2, X) {
! 32: ox_cmo_rpc(PID, "func", "resultant", F1, F2, X);
! 33: return (ox_pop_cmo(PID));
! 34: }
! 35:
! 36:
! 37: def whattype(PID) {
! 38: ox_push_cmo(PID, ntoint32(1));
! 39: ox_push_cmo(PID, "whattype");
! 40: ox_push_cmd(PID, 269); /* executeFunction */
! 41: return (ox_pop_cmo(PID));
! 42: }
! 43:
! 44:
! 45:
! 46: endmodule;
! 47:
! 48: end$
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>