source: git/Tst/Manual/extendring.tst @ 951db29

spielwiese
Last change on this file since 951db29 was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 1.0 KB
Line 
1LIB "tst.lib"; tst_init();
2LIB "ring.lib";
3ring r=0,(x,y,z),ds;
4show(r);"";
5// blocksize is derived from no of vars:
6int t=5;
7def R1=extendring(t,"a","dp");         //t global: "dp" -> "dp(5)"
8show(R1); setring R1; "";
9def R2=extendring(4,"T(","c,dp",1,r);    //"dp" -> "c,..,dp(4)"
10show(R2); setring R2; "";
11// no intvec given, blocksize given: given blocksize is used:
12def R3=extendring(4,"T(","dp(2)",0,r);   // "dp(2)" -> "dp(2)"
13show(R3); setring R3; "";
14// intvec given: weights and blocksize is derived from given intvec
15// (no specification of a blocksize in the given ordstr is allowed!)
16// if intvec does not cover all given blocks, the last block is used
17// for the remaining variables, if intvec has too many components,
18// the last ones are ignored
19intvec v=3,2,3,4,1,3;
20def R4=extendring(10,"A","ds,ws,Dp,dp",v,0,r);
21// v covers 3 blocks: v[1] (=3) : no of components of ws
22// next v[1] values (=v[2..4]) give weights
23// remaining components of v are used for the remaining blocks
24show(R4);
25kill r,R1,R2,R3,R4;
26tst_status(1);$
Note: See TracBrowser for help on using the repository browser.