spielwiese
Last change
on this file since 7604db was
7604db,
checked in by Olaf Bachmann <obachman@…>, 24 years ago

* print command
gitsvnid: file:///usr/local/Singular/svn/trunk@2992 2c84dea37e6841379b89c4e89433aadc


Property mode set to
100644

File size:
1.5 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, \"%l\")"; 

18  print(what, "%l"); 

19  "print(what, \"%;\")"; 

20  print(what, "%;"); 

21  "print(what, \"%2s\")"; 

22  print(what, "%2s"); 

23  "print(what, \"%2l\")"; 

24  print(what, "%2l"); 

25  "print(what, \"%t\")"; 

26  print(what, "%t"); 

27  } 

28  

29  list l = 1, 2; 

30  MyPrint(l); 

31  

32  list ll; 

33  MyPrint(ll); 

34  

35  l = l + ll; 

36  MyPrint(l); 

37  

38  l = insert(l, ll); 

39  MyPrint(l); 

40  

41  l[10] = 5; 

42  

43  string(l); 

44  MyPrint(l); 

45  

46  l[3] = intvec(1,2,3); 

47  l[4] = "hi"; 

48  MyPrint(l); 

49  

50  l[6] = list("ho", "he"); 

51  MyPrint(l); 

52  

53  l[8] = MyPrint; 

54  MyPrint(l); 

55  

56  link li = "/tmp"; 

57  l[8] = li; 

58  MyPrint(l); 

59  

60  ring r; 

61  MyPrint(r); 

62  

63  ideal i; 

64  MyPrint(i); 

65  

66  number n = 12345; 

67  MyPrint(n); 

68  

69  vector v = [x+1, y]; 

70  MyPrint(v); 

71  

72  poly p = x2+y3+n; 

73  MyPrint(p); 

74  

75  l[8] = r; 

76  l[9] = i; 

77  l[7] = n; 

78  // l[1] = v; 

79  l[5] = p; 

80  MyPrint(l); 

81  

82  matrix ma[2][2] = x,y,z,x2; 

83  MyPrint(ma); 

84  

85  module m=[1,y],[0,x+z]; 

86  MyPrint(m); 

87  

88  l[1]= list(ma, m); 

89  MyPrint(l); 

90  

91  intmat M=betti(mres(m,0)); 

92  MyPrint(M); 

93  print(M,"betti"); 

94  print(M, "%b"); 

95  l[2] = M; 

96  MyPrint(l); 

97  

98  ideal j = z2,x; 

99  resolution re = res(j,0); 

100  MyPrint(re); 

101  l[11] = re; 

102  MyPrint(re); 

103  

104  matrix B(1..3); 

105  B(1)[1,1] = 1; 

106  B(2)[1,1] = 2; 

107  B(3)[1,1] = 3; 

108  

109  B(1..3); 

110  print(B(1..3)); 

111  string(B(1..3)); 

112  

113  qring qr = std(ideal(x,y)); 

114  MyPrint(qr); 

115  

116  list l = 1, qr, list(2, qr); 

117  MyPrint(l); 

118  

119  map phi = r, maxideal(2); 

120  MyPrint(phi); 

121  

122  l[5] = phi; 

123  MyPrint(l); 

124  

125  tst_status(1);$ 

126  

Note: See
TracBrowser
for help on using the repository browser.