spielwiese
Last change
on this file since 458bd6 was
458bd6,
checked in by Olaf Bachmann <obachman@…>, 24 years ago
|
* new tests
git-svn-id: file:///usr/local/Singular/svn/trunk@2988 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | |
---|
5 | proc MyPrint(def what) |
---|
6 | { |
---|
7 | "what"; |
---|
8 | what; |
---|
9 | "print(what)"; |
---|
10 | print(what); |
---|
11 | "string(what)"; |
---|
12 | string(what); |
---|
13 | "print(what, \"%s\")"; |
---|
14 | print(what, "%s"); |
---|
15 | "print(what, \"%p\")"; |
---|
16 | print(what, "%p"); |
---|
17 | "print(what, \"%t\")"; |
---|
18 | print(what, "%t"); |
---|
19 | "print(what, \"%;\")"; |
---|
20 | print(what, "%;"); |
---|
21 | } |
---|
22 | |
---|
23 | list l = 1, 2; |
---|
24 | MyPrint(l); |
---|
25 | l; |
---|
26 | |
---|
27 | list ll; |
---|
28 | MyPrint(ll); |
---|
29 | |
---|
30 | l = l + ll; |
---|
31 | MyPrint(l); |
---|
32 | |
---|
33 | l = insert(l, ll); |
---|
34 | MyPrint(l); |
---|
35 | |
---|
36 | l[10] = 5; |
---|
37 | |
---|
38 | string(l); |
---|
39 | MyPrint(l); |
---|
40 | |
---|
41 | l[3] = intvec(1,2,3); |
---|
42 | l[4] = "hi"; |
---|
43 | MyPrint(l); |
---|
44 | |
---|
45 | l[6] = list("ho", "he"); |
---|
46 | MyPrint(l); |
---|
47 | |
---|
48 | l[8] = MyPrint; |
---|
49 | MyPrint(l); |
---|
50 | |
---|
51 | link li = "/tmp"; |
---|
52 | l[8] = li; |
---|
53 | MyPrint(l); |
---|
54 | |
---|
55 | ring r; |
---|
56 | MyPrint(r); |
---|
57 | |
---|
58 | ideal i; |
---|
59 | MyPrint(i); |
---|
60 | |
---|
61 | l[8] = r; |
---|
62 | l[9] = i; |
---|
63 | MyPrint(l); |
---|
64 | |
---|
65 | matrix ma[2][2] = x,y,z,x2; |
---|
66 | MyPrint(ma); |
---|
67 | |
---|
68 | module m=[1,y],[0,x+z]; |
---|
69 | MyPrint(m); |
---|
70 | |
---|
71 | l[1]= list(ma, m); |
---|
72 | MyPrint(l); |
---|
73 | |
---|
74 | intmat M=betti(mres(m,0)); |
---|
75 | MyPrint(M); |
---|
76 | print(M,"betti"); |
---|
77 | print(M, "%b"); |
---|
78 | l[2] = M; |
---|
79 | MyPrint(l); |
---|
80 | |
---|
81 | ideal j = z2,x; |
---|
82 | resolution re = res(j,0); |
---|
83 | MyPrint(re); |
---|
84 | l[11] = re; |
---|
85 | MyPrint(re); |
---|
86 | |
---|
87 | matrix B(1..3); |
---|
88 | B(1)[1,1] = 1; |
---|
89 | B(2)[1,1] = 2; |
---|
90 | B(3)[1,1] = 3; |
---|
91 | |
---|
92 | B(1..3); |
---|
93 | print(B(1..3)); |
---|
94 | string(B(1..3)); |
---|
95 | |
---|
96 | qring qr = std(ideal(x,y)); |
---|
97 | MyPrint(qr); |
---|
98 | |
---|
99 | list l = 1, qr, list(2, qr); |
---|
100 | MyPrint(l); |
---|
101 | |
---|
102 | |
---|
103 | tst_status(1);$ |
---|
104 | |
---|
Note: See
TracBrowser
for help on using the repository browser.