|
4.6.4 ASCII linksVia ASCII links data that can be converted to a string can be written
into files for storage or communication with other programs. The data is
written in plain ASCII format. The output format of polynomials is done
w.r.t. the value of the global variable The ASCII link describing string has to be one of the following:
There are the following default values:
Using these default rules, the string Note that the filename may contain a path. On Microsoft Windows
(resp. MS-DOS) platforms, names of a drive can precede the filename, but
must be started with a Example: ring r=32003,(x,y,z),dp; link l=":w example.txt"; // type is ASCII, mode is overwrite l; → // type : ASCII → // mode : w → // name : example.txt → // open : no → // read : not ready → // write: not ready status(l, "open", "yes"); // link is not yet opened → 0 ideal i=x2,y2,z2; write (l,1,";",2,";","ideal i=",i,";"); status(l, "open", "yes"); // now link is open → 1 status(l, "mode"); // for writing → w close(l); // link is closed write("example.txt","int j=5;");// data is appended to file read("example.txt"); // data is returned as string → 1 → ; → 2 → ; → ideal i= → x2,y2,z2 → ; → int j=5; → execute(read(l)); // read string is executed → 1 → 2 → // ** redefining i ** close(l); // link is closed |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |