- Timestamp:
- Aug 17, 2024, 3:15:21 PM (4 months ago)
- Branches:
- master
- Children:
- df2e00f
- Parents:
- afb15cf
- Location:
- doc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/jiada_liang_MMath/CFAenum.tex
rafb15cf r3ac5fd8 471 471 E e; 472 472 473 for () { 474 try { 475 @sin | e@; 476 } catch( missing_data * ) { 477 sout | "missing data"; 478 continue; // try again 473 try { 474 for () { 475 try { 476 @sin | e@; 477 } catch( missing_data * ) { 478 sout | "missing data"; 479 continue; // try again 480 } 481 sout | e | "= " | value( e ); 479 482 } 480 if ( eof( sin ) ) break; 481 sout | e | "= " | value( e ); 482 } 483 } catch( end_of_file ) {} 483 484 } 484 485 \end{cfa} -
doc/user/user.tex
rafb15cf r3ac5fd8 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Fri Jul 26 06:56:11202414 %% Update Count : 695 513 %% Last Modified On : Thu Aug 15 22:23:30 2024 14 %% Update Count : 6957 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 4656 4656 \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. 4657 4657 Note, 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.} 4659 4659 4660 4660 \begin{figure} … … 4686 4686 in | nlOn; §\C{// turn on reading newline}§ 4687 4687 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 4693 4695 } // main 4694 4696 \end{cfa}
Note: See TracChangeset
for help on using the changeset viewer.