Changeset 7d25f44
- Timestamp:
- Jun 29, 2023, 12:12:01 PM (20 months ago)
- Branches:
- master
- Children:
- 85a3806
- Parents:
- f5d9c37
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/containers/string_res.cfa
rf5d9c37 r7d25f44 9 9 // Author : Michael L. Brooks 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 // Last Modified By : Michael L. Brooks12 // Last Modified On : Fri Sep 03 11:00:00 202113 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 29 09:29:06 2023 13 // Update Count : 2 14 14 // 15 15 … … 204 204 out | s[i]; 205 205 } 206 out | sep ;206 out | sepVal; 207 207 // Re-apply newlines after done, for chaining version 208 208 if (anl) nlOn(out); -
libcfa/src/gmp.hfa
rf5d9c37 r7d25f44 10 10 // Created On : Tue Apr 19 08:43:43 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Apr 20 20:59:21 202113 // Update Count : 3 212 // Last Modified On : Thu Jun 29 09:43:30 2023 13 // Update Count : 33 14 14 // 15 15 … … 265 265 if ( sepPrt$( os ) ) fmt( os, "%s", sepGetCur$( os ) ); 266 266 gmp_printf( "%Zd", mp.mpz ); 267 sep On( os );267 sep( os ); 268 268 return os; 269 269 } // ?|? -
libcfa/src/parseconfig.cfa
rf5d9c37 r7d25f44 29 29 // TODO: use string interface when it's ready (and implement exception msg protocol) 30 30 [ void ] msg( * Missing_Config_Entries ex ) { 31 serr | "The config file is missing " | ex->num_missing | "entr" | sepOff| (ex->num_missing == 1 ? "y." : "ies.");31 serr | "The config file is missing " | ex->num_missing | "entr" | nosep | (ex->num_missing == 1 ? "y." : "ies."); 32 32 } // msg 33 33 -
tests/PRNG.cfa
rf5d9c37 r7d25f44 10 10 // Created On : Wed Dec 29 09:38:12 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu May 25 15:39:52202313 // Update Count : 42 212 // Last Modified On : Thu Jun 29 10:18:35 2023 13 // Update Count : 424 14 14 // 15 15 … … 144 144 srand( rseed ); 145 145 146 sout | sep Disable;146 sout | sepOff; 147 147 sout | nl | wd(26, "rand()" ) | wd(12, "rand(5)") | wd(12, "rand(0,5)" ); 148 148 for ( 20 ) { … … 151 151 sout | wd(12, rand() % (5 - 0 + 1) + 0); 152 152 } // for 153 sout | sep Enable;153 sout | sepOn; 154 154 sout | "seed" | rseed; 155 155 … … 185 185 if ( seed != 0 ) set_seed( prng, seed ); 186 186 187 sout | sep Disable;187 sout | sepOff; 188 188 sout | nl | wd(26, "PRNG()" ) | wd(12, "PRNG(5)") | wd(12, "PRNG(0,5)" ); 189 189 for ( 20 ) { … … 192 192 sout | wd(12, prng( prng, 0, 5 )); 193 193 } // for 194 sout | sep Enable;194 sout | sepOn; 195 195 sout | "seed" | get_seed( prng ); 196 196 … … 220 220 if ( seed != 0 ) set_seed( seed ); 221 221 222 sout | sep Disable;222 sout | sepOff; 223 223 sout | nl | wd(26, "prng()" ) | wd(12, "prng(5)") | wd(12, "prng(0,5)" ); 224 224 for ( 20 ) { … … 227 227 sout | wd(12, prng( 0, 5 )); 228 228 } // for 229 sout | sep Enable;229 sout | sepOn; 230 230 sout | "seed" | get_seed( prng ); 231 231 … … 256 256 thread$ & th = *active_thread(); 257 257 258 sout | sep Disable;258 sout | sepOff; 259 259 sout | nl | wd(26, "prng(t)" ) | wd(12, "prng(t,5)") | wd(12, "prng(t,0,5)" ); 260 260 for ( 20 ) { … … 263 263 sout | wd(12, prng( th, 0, 5 )); 264 264 } // for 265 sout | sep Enable;265 sout | sepOn; 266 266 sout | "seed" | get_seed( prng ); 267 267 -
tests/io/.expect/io.txt
rf5d9c37 r7d25f44 61 61 1, 2, 3 4, 5, 6 62 62 63 check sep On/sepOff63 check sep/nosep 64 64 1 2 3 65 65 12 3 -
tests/io/io.cfa
rf5d9c37 r7d25f44 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Feb 21 10:56:33 202113 // Update Count : 12 112 // Last Modified On : Thu Jun 29 10:19:31 2023 13 // Update Count : 126 14 14 // 15 15 … … 122 122 sout | "toggle separator"; 123 123 sout | f | "" | d | "" | ld; // floating point without separator 124 sout | sep Disable | fc | dc | ldc;// complex without separator125 sout | fc | sep On | dc | ldc;// local separator add126 sout | sep Enable | fc | dc | ldc;// complex with separator127 sout | fc | sepOff| dc | ldc; // local separator removal128 sout | s1 | sepOff | s2;// local separator removal124 sout | sepOff | fc | dc | ldc; // complex without separator 125 sout | fc | sep | dc | ldc; // local separator add 126 sout | sepOn | fc | dc | ldc; // complex with separator 127 sout | fc | nosep | dc | ldc; // local separator removal 128 sout | s1 | nosep | s2; // local separator removal 129 129 sout | s1 | "" | s2; // local separator removal 130 130 sout | nl; 131 131 132 132 sout | "change separator"; 133 sout | "from \"" | sep | "\"" | nonl;133 sout | "from \"" | sepVal | "\"" | nonl; 134 134 sepSet( sout, ", $" ); // change separator, maximum of 15 characters 135 sout | " to \"" | sep | "\"";135 sout | " to \"" | sepVal | "\""; 136 136 sout | f | d | ld; 137 137 sout | fc | dc | ldc; … … 139 139 sout | t1 | t2; // print tuple 140 140 sout | nl; 141 sout | "from \"" | sep | "\" " | nonl;141 sout | "from \"" | sepVal | "\" " | nonl; 142 142 sepSet( sout, " " ); // restore separator 143 sout | "to \"" | sep | "\"";143 sout | "to \"" | sepVal | "\""; 144 144 sout | f | d | ld; 145 145 sout | fc | dc | ldc; … … 148 148 sout | nl; 149 149 150 sout | "check sep On/sepOff";151 sout | sep On | 1 | 2 | 3 | sepOn;// no separator at start/end of line152 sout | 1 | sepOff| 2 | 3; // locally turn off implicit separator153 sout | sep On | sepOn | 1 | 2 | 3 | sepOn | sepOff | sepOn| '\n' | nonl; // no separator at start/end of line154 sout | 1 | 2 | 3 | "\n\n" | sep On | nonl;// no separator at start of next line150 sout | "check sep/nosep"; 151 sout | sep | 1 | 2 | 3 | sep; // no separator at start/end of line 152 sout | 1 | nosep | 2 | 3; // locally turn off implicit separator 153 sout | sep | sep | 1 | 2 | 3 | sep | nosep | sep | '\n' | nonl; // no separator at start/end of line 154 sout | 1 | 2 | 3 | "\n\n" | sep | nonl; // no separator at start of next line 155 155 sout | 1 | 2 | 3; 156 156 sout | nl; 157 157 158 158 sout | "check enable/disable"; 159 sout | sep Disable | 1 | 2 | 3;// globally turn off implicit separation160 sout | 1 | sep On | 2 | 3;// locally turn on implicit separator161 sout | sep Enable | 1 | 2 | 3 | sepDisable;// globally turn on/off implicit separation162 sout | 1 | 2 | 3 | sep Enable;// globally turn on implicit separation163 sout | 1 | 2 | 3 | sep On | sepDisable;// ignore seperate at end of line164 sout | 1 | 2 | 3 | sep On | sepEnable;// separator at end of line159 sout | sepOff | 1 | 2 | 3; // globally turn off implicit separation 160 sout | 1 | sep | 2 | 3; // locally turn on implicit separator 161 sout | sepOn | 1 | 2 | 3 | sepOff; // globally turn on/off implicit separation 162 sout | 1 | 2 | 3 | sepOn; // globally turn on implicit separation 163 sout | 1 | 2 | 3 | sep | sepOff; // ignore seperate at end of line 164 sout | 1 | 2 | 3 | sep | sepOn; // separator at end of line 165 165 sout | 1 | 2 | 3; 166 166 sout | nl; … … 169 169 170 170 sepSetTuple( sout, " " ); // set tuple separator from ", " to " " 171 sout | t1 | t2 | " \"" | sep | "\"";171 sout | t1 | t2 | " \"" | sepVal | "\""; 172 172 sepSetTuple( sout, ", " ); // reset tuple separator to ", " 173 sout | t1 | t2 | " \"" | sep | "\"";173 sout | t1 | t2 | " \"" | sepVal | "\""; 174 174 sout | t1 | t2; // print tuple 175 175 sout | nl; … … 180 180 sepSetTuple( sout, " " ); 181 181 sout | t3; 182 sout | sep On | t3 | sepDisable | t3 | sepEnable| t3;182 sout | sep | t3 | sepOff | t3 | sepOn | t3; 183 183 sepSet( sout, "^" ); 184 184 sepSetTuple( sout, "-" ); -
tests/raii/dtor-early-exit.cfa
rf5d9c37 r7d25f44 10 10 // Created On : Wed Aug 17 08:26:25 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Dec 21 08:45:19 201813 // Update Count : 1 012 // Last Modified On : Thu Jun 29 11:15:56 2023 13 // Update Count : 11 14 14 // 15 15 … … 244 244 245 245 int main() { 246 sep Disable(sout);246 sepOff(sout); 247 247 for (int i = 0; i < 4; i++) { 248 248 f(i);
Note: See TracChangeset
for help on using the changeset viewer.