source: git/Tst/Old/m24si.tst

spielwiese
Last change on this file was 75f460, checked in by Hans Schoenemann <hannes@…>, 9 years ago
format
  • Property mode set to 100644
File size: 1.0 KB
Line 
1  ring r=32003,(x,y,z),dp;
2  link l=":w example.txt";     // type is Ascii, mode is overwrite
3  l;
4  status(l, "name");           // name is example.txt
5  status(l, "open", "yes");    // link is not yet opened
6  ideal i=maxideal(2);
7  write (l,1,";",2,";","ideal i=",i,";");
8  status(l, "open", "yes");    // now link is open
9  status(l, "mode");           // for writing
10  write("example.txt","int j=5;");// data is appended to file
11  read("example.txt");         // data is returned as string
12  close(l);                    // link is closed
13  execute(read(l));             // read string is executed
14  status(l, "open", "yes");    // now link is open
15  status(l, "mode");           // in read mode
16  close(l);                    // link is closed
17  // dump vars overwriting previous file content:
18  dump(":w example.txt");
19  kill r;
20  getdump("example.txt");      // get dump from file
21  LIB "general.lib";
22  killall("proc");
23  kill killall;
24  dump("");                    // dump to stdout
25  system("sh","rm example.txt");
26LIB "tst.lib";tst_status(1);$
Note: See TracBrowser for help on using the repository browser.