- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/coroutine/.expect/fmtLines.txt
re6cfa8ff rf8cd310 48 48 { // f or n ewli 49 49 ne c hara cter s su 50 spen d ; i f ( fmt.51 ch ! = '\ n' ) bre ak;52 // igno re n ewli ne53 } // f or so ut |54 fmt .ch; / / pr55 int char acte r } //56 for s out | " ";57 / / pr int bloc58 k se para tor } / / fo59 r s out | nl ;60 // pri nt g roup sep61 arat or } // for} //62 main void prt ( Fo rmat63 & f mt, char ch ) {64 f mt.c h = ch; r65 esum e( f mt ) ;} / / pr66 tint mai n() { Fo rmat67 fmt ; ch ar c h; f or (68 ;; ) { sin | c h;69 // r ead one70 char acte r if ( eof71 ( si n ) ) br eak;72 / / eo f ? prt ( fm73 t, c h ); } / / fo r} /74 / ma in// Loc al V aria75 bles : // // t ab-w idth76 : 4 //// com pile -com77 mand : "c fa f mtLi nes.78 cfa" /// / En d: //50 spen d(); if ( fm 51 t.ch != '\n' ) b reak 52 ; / / ig nore new line 53 } // for sout 54 | f mt.c h; // 55 prin t ch arac ter } 56 // f or sou t | " " 57 ; // prin t bl 58 ock sepa rato r } // 59 for sou t | nl; 60 // p rint gro up s 61 epar ator } / / fo r} / 62 / ma invo id p rt( Form 63 at & fmt , ch ar c h ) 64 { fmt .ch = ch ; 65 res ume( fmt );} // 66 prti nt m ain( ) { Form 67 at f mt; char ch; for 68 ( ; ; ) { s in | ch; 69 // rea d on 70 e ch arac ter if ( e 71 of( sin ) ) brea k; 72 // eof ? p rt( 73 fmt, ch ); } // for} 74 // main // L ocal Var 75 iabl es: //// tab -wid 76 th: 4 // // c ompi le-c 77 omma nd: "cfa fmt Line 78 s.cf a" / /// End: //
Note: See TracChangeset
for help on using the changeset viewer.