.. _ropen: Open and Write to Files (Obsolete) ---------------------------------- .. function:: ropen Syntax: ``ropen("infile")`` ``ropen()`` Description: ``Ropen()`` opens *infile* for reading. A subsequent ``ropen()`` with no arguments closes the previously opened *infile*. A file which is re-opened with ``ropen(infile)`` positions the stream at the beginning of the file. Example: .. code-block:: none proc r() { ropen("file.dat") for (i=0; i`, :func:`fscan`, :func:`getstr`, :class:`File` .. warning:: There is no way to open more than one read file at a time. The same is true for write files. ---- .. function:: wopen Syntax: ``wopen("outfile)`` ``wopen()`` Description: ``Wopen`` is similar to ``ropen`` but opens a file for writing. Contents of an already existing *outfile* are destroyed. Wopened files are written to with :func:`fprint`. With no argument, the previously wopened file is closed. Wopen returns 0 on failure to open a file. Example: .. code-block:: none proc w() { wopen("file.dat") for (i=0; i