source: git/Tst/Old/m25si.tst @ 882ae9c

spielwiese
Last change on this file since 882ae9c was 60a365f, checked in by Hans Schönemann <hannes@…>, 25 years ago
*hannes: changes in the bahaviour of kill/killall git-svn-id: file:///usr/local/Singular/svn/trunk@3719 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.1 KB
Line 
1  ring r;
2  link l="MPfile:w example.mp"; // type=MPfile, mode=overwrite
3  l;
4  status(l, "name"); // name is example.mp; link is not yet opened
5  ideal i=maxideal(2);
6  write (l,1, i, "hello world");// write three expressions
7  status(l, "open", "yes");     // now link is open
8  status(l, "mode");            // in write mode
9  write(l,4);                   // append one more expression
10  close(l);                     // link is closed
11  read(l);                      // only first expression is read
12  status(l, "open", "yes");     // now link is open
13  status(l, "mode");            // for reading
14  kill r;
15  def i = read(l);              // second expression
16  listvar();                    // notice that current ring was set
17  def s = read(l);              // third expression
18  close(l);                     // link is closed
19  dump("MPfile:w example.mp");  // dump everything to example.mp
20  kill basering, s; listvar();  // kill all vars
21  getdump("MPfile: example.mp");// get dump from file
22  LIB "general.lib";
23  killall("proc");
24  kill killall;
25  dump("");                     // dump to stdout
26LIB "tst.lib";tst_status(1);$
Note: See TracBrowser for help on using the repository browser.