[top][index]
search for:

File << Thing -- pirnt something to a file

Synopsis:

  • Operator: <<
  • Input:
  • an instance of class File.
  • an instance of class Thing.
  • Output:
  • an instance of class File.
  • f << x -- prints the expression x on the output file f.

    Returns f as its value. Parsing associates leftward, so that several expressions may be displayed with something like f<<x<<y<<z. If f is a string, then a new file with name f is created, the expression x is printed into f, and the file f is closed.

    i1 : x = 5

    o1 = 5
    i2 : << "the value of x is " << x << endl
    the value of x is 5

    o2 = stdio

    o2 : File

      --  the standard input output file

    See also:

  • <<
  • Code:

         -- ../../../Macaulay2/m2/expressions.m2:1074
         File << Thing := File => (o,x) -> printString(o,net x)

    [top][index]
    search for: