Annotation of OpenXM/src/k097/lib/Old/setvariables.ccc.96jul23, Revision 1.1.1.1
1.1 maekawa 1:
2:
3: /* lib/setvariables.ccc : to generate sm1-package setvariables.sm1 */
4: /* sm1(" (incmac.sm1) run (slib.sm1) run ");
5: sm1(" (factor-a.sm1) run "); run does not work!! */
6: sm1(" 0 @@@.indexMode "); /* C-like notation of matrix. a[0], ... */
7:
8: def getxvar(i) {
9: sm1( "[(x) (var) ", i , " ..int ] system_variable /FunctionValue set ");
10: }
11:
12: def getdvar(i) {
13: sm1( "[(D) (var) ", i , " ..int ] system_variable /FunctionValue set ");
14: }
15:
16: def getvarn() {
17: sm1( "[(N)] system_variable (universalNumber) dc /FunctionValue set ");
18: }
19:
20: def setRingVariables() {
21: local n,i,v,f;
22: n = getvarn();
23: for (i=0; i<n; i++) {
24: v = getxvar(i);
25: f = Poly(v);
26: sm1( v ," (literal) dc ", f ," def ");
27: v = getdvar(i);
28: f = Poly(v);
29: sm1( v ," (literal) dc ", f ," def ");
30: }
31: }
32:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>