Changeset 960665c for doc/user/user.tex


Ignore:
Timestamp:
Aug 20, 2024, 6:15:01 PM (15 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
ad47ec4
Parents:
d1f5054 (diff), df2e00f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    rd1f5054 r960665c  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Fri Jul 26 06:56:11 2024
    14 %% Update Count     : 6955
     13%% Last Modified On : Thu Aug 15 22:23:30 2024
     14%% Update Count     : 6957
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    46564656\VRef[Figure]{f:CFACommand-LineProcessing} demonstrates the file operations by showing the idiomatic \CFA command-line processing and copying an input file to an output file.
    46574657Note, a stream variable may be copied because it is a reference to an underlying stream data-structures.
    4658 \Textbf{All I/O errors are handled as exceptions}, but end-of-file is not an exception as C programmers are use to explicitly checking for it.
     4658\Textbf{All unusual I/O cases are handled as exceptions, including end-of-file.}
    46594659
    46604660\begin{figure}
     
    46864686        in | nlOn;                                                              §\C{// turn on reading newline}§
    46874687        char ch;
    4688         for () {                                                                §\C{// read/write characters}§
    4689                 in | ch;
    4690           if ( eof( in ) ) break;                               §\C{// eof ?}§
    4691                 out | ch;
    4692         } // for
     4688        try {
     4689                for () {                                                        §\C{// read/write characters}§
     4690                        in | ch;
     4691                        out | ch;
     4692                } // for
     4693        } catch( end_of_file * ) {                              §\C{// end-of-file raised}§
     4694        } // try
    46934695} // main
    46944696\end{cfa}
Note: See TracChangeset for help on using the changeset viewer.