- Timestamp:
- Mar 14, 2025, 7:15:01 PM (2 weeks ago)
- Branches:
- master
- Children:
- 8617ee90
- Parents:
- 7611631
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified doc/theses/mike_brooks_MMath/programs/sharing-demo.cfa ¶
r7611631 r06ffa95 11 11 // sout | "Consider two strings @s1@ and @s1a@ that are in an aliasing relationship, and a third, @s2@, made by a simple copy from @s1@."; 12 12 13 #define S1 string s1 14 #define S1A string s1a = s1`share Edits15 #define S2 string s2 = s113 #define S1 string s1 = "abc" 14 #define S1A string s1a = s1`share 15 #define S2 string s2 = s1a 16 16 S1; 17 17 S1A; … … 23 23 open( outfile, "build/sharing1.tex" ); 24 24 outfile | "\\begin{cquote}"; 25 outfile | "\\begin{tabular}{@{} llll@{}}";25 outfile | "\\begin{tabular}{@{}rlll@{}}"; 26 26 outfile | "\t\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\"; 27 outfile | xstr(S1) | "\t \\\\";28 outfile | xstr(S1A) | "\t \\\\";29 outfile | xstr(S2) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2;30 outfile | "\\end{tabular}"; 31 outfile | "\\end{cquote}"; 32 close( outfile ); 33 34 // sout | "Aliasing (@`share Edits@) means that changes flow in both directions; with a simple copy, they do not.";27 outfile | xstr(S1) | "\t& @\"" | s1 | "\"@\t\\\\"; 28 outfile | xstr(S1A) | "\t& \t& @\"" | s1a | "\"@\t\\\\"; 29 outfile | xstr(S2) | "\t& \t& \t& @\"" | s2 | "\"@"; 30 outfile | "\\end{tabular}"; 31 outfile | "\\end{cquote}"; 32 close( outfile ); 33 34 // sout | "Aliasing (@`share@) means that changes flow in both directions; with a simple copy, they do not."; 35 35 open( outfile, "build/sharing2.tex" ); 36 36 outfile | "\\begin{cquote}"; 37 outfile | "\\begin{tabular}{@{} llll@{}}";37 outfile | "\\begin{tabular}{@{}rlll@{}}"; 38 38 outfile | "\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\"; 39 outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";40 41 #define S1s1 s1 39 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 40 41 #define S1s1 s1[1] = '+' 42 42 S1s1; 43 43 assert( s1 == "a+c" ); 44 outfile | xstr(S1s1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";44 outfile | xstr(S1s1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 45 45 46 46 #define S1As1 s1a[1] = '-' 47 47 S1As1; 48 48 assert( s1a == "a-c" ); 49 outfile | xstr(S1As1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";50 51 #define S2s1 s2 49 outfile | xstr(S1As1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 50 51 #define S2s1 s2[1] = '|' 52 52 S2s1; 53 53 assert( s2 == "a|c" ); 54 outfile | xstr(S2s1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2;54 outfile | xstr(S2s1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@"; 55 55 outfile | "\\end{tabular}"; 56 56 outfile | "\\end{cquote}"; … … 61 61 open( outfile, "build/sharing3.tex" ); 62 62 outfile | "\\begin{cquote}"; 63 outfile | "\\begin{tabular}{ llll}";63 outfile | "\\begin{tabular}{@{}rlll@{}}"; 64 64 outfile | "\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\"; 65 outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";65 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 66 66 67 67 #define S1qrs s1 = "qrs" 68 68 S1qrs; 69 69 assert( s1 == "qrs" ); 70 outfile | xstr(S1qrs) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";70 outfile | xstr(S1qrs) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 71 71 72 72 #define S1Atuv s1a = "tuv" 73 73 S1Atuv; 74 74 assert( s1a == "tuv" ); 75 outfile | xstr(S1Atuv) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";75 outfile | xstr(S1Atuv) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 76 76 77 77 #define S2wxy s2 = "wxy" 78 78 S2wxy; 79 79 assert( s2 == "wxy" ); 80 outfile | xstr(S2wxy) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2;80 outfile | xstr(S2wxy) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@"; 81 81 outfile | "\\end{tabular}"; 82 82 outfile | "\\end{cquote}"; … … 87 87 open( outfile, "build/sharing4.tex" ); 88 88 outfile | "\\begin{cquote}"; 89 outfile | "\\begin{tabular}{ llll}";89 outfile | "\\begin{tabular}{@{}rlll@{}}"; 90 90 outfile | "\t\t& @s1@\t& @s1a@\t& @s2@\t\\\\"; 91 outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";91 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 92 92 93 93 #define S1S2 s1 = s2 … … 96 96 assert( s1a == "wxy" ); 97 97 assert( s2 == "wxy" ); 98 outfile | xstr(S1S2) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";98 outfile | xstr(S1S2) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 99 99 100 100 #define S1aaa s1 = "aaa" … … 103 103 assert( s1a == "aaa" ); 104 104 assert( s2 == "wxy" ); 105 outfile | xstr(S1aaa) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";105 outfile | xstr(S1aaa) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 106 106 107 107 #define S2S1 s2 = s1 … … 110 110 assert( s1a == "aaa" ); 111 111 assert( s2 == "aaa" ); 112 outfile | xstr(S2S1) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";112 outfile | xstr(S2S1) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 113 113 114 114 #define S2bbb s2 = "bbb" … … 117 117 assert( s1a == "aaa" ); 118 118 assert( s2 == "bbb" ); 119 outfile | xstr(S2bbb) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";119 outfile | xstr(S2bbb) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 120 120 121 121 #define S2S1a s2 = s1a … … 124 124 assert( s1a == "aaa" ); 125 125 assert( s2 == "aaa" ); 126 outfile | xstr(S2S1a) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";126 outfile | xstr(S2S1a) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 127 127 128 128 #define S2ccc s2 = "ccc" … … 131 131 assert( s1a == "aaa" ); 132 132 assert( s2 == "ccc" ); 133 outfile | xstr(S2ccc) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";133 outfile | xstr(S2ccc) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 134 134 135 135 #define S1xxx s1 = "xxx" … … 138 138 assert( s1a == "xxx" ); 139 139 assert( s2 == "ccc" ); 140 outfile | xstr(S1xxx) | "\t& " | s1 | "\t& " | s1a | "\t& " | s2 | "\t\\\\";140 outfile | xstr(S1xxx) | "\t& @\"" | s1 | "\"@\t& @\"" | s1a | "\"@\t& @\"" | s2 | "\"@"; 141 141 outfile | "\\end{tabular}"; 142 142 outfile | "\\end{cquote}"; … … 149 149 open( outfile, "build/sharing5.tex" ); 150 150 outfile | "\\begin{cquote}"; 151 outfile | "\\begin{tabular}{ llll}";151 outfile | "\\begin{tabular}{@{}rlll@{}}"; 152 152 outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t& @s2@\t\\\\"; 153 153 154 #define D2_s1_abcd string s1 154 #define D2_s1_abcd string s1 = "abcd" 155 155 D2_s1_abcd; 156 outfile | xstr(D2_s1_abcd) | "\t \\\\";157 158 #define D2_s1mid_s1 string s1_mid = s1(1,2)`share Edits156 outfile | xstr(D2_s1_abcd) | "\t& @\"" | s1 | "\"@\t\\\\"; 157 158 #define D2_s1mid_s1 string s1_mid = s1(1,2)`share 159 159 D2_s1mid_s1; 160 outfile | xstr(D2_s1mid_s1) | "\t \\\\";161 162 #define D2_s2_s1 string s2 = s1(1,2)160 outfile | xstr(D2_s1mid_s1) | "\t& \t& @\"" | s1_mid | "\"@\t\\\\"; 161 162 #define D2_s2_s1 string s2 = s1_mid(0,2) 163 163 D2_s2_s1; 164 164 assert( s1 == "abcd" ); 165 165 assert( s1_mid == "bc" ); 166 166 assert( s2 == "bc" ); 167 outfile | xstr(D2_s2_s1) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";168 outfile | "\\end{tabular}"; 169 outfile | "\\end{cquote}"; 170 close( outfile ); 171 172 // sout | "Again, @`share Edits@ passes changes in both directions; copy does not. Note the difference in index values, with the \\emph{b} position being 1 in the longer string and 0 in the shorter strings. In the case of s1 aliasing with @s1_mid@, the very same character is being accessed by different postitions.";167 outfile | xstr(D2_s2_s1) | "\t& \t& \t& @\"" | s2 | "\"@"; 168 outfile | "\\end{tabular}"; 169 outfile | "\\end{cquote}"; 170 close( outfile ); 171 172 // sout | "Again, @`share@ passes changes in both directions; copy does not. Note the difference in index values, with the \\emph{b} position being 1 in the longer string and 0 in the shorter strings. In the case of s1 aliasing with @s1_mid@, the very same character is being accessed by different postitions."; 173 173 open( outfile, "build/sharing6.tex" ); 174 174 outfile | "\\begin{cquote}"; 175 outfile | "\\begin{tabular}{ llll}";175 outfile | "\\begin{tabular}{@{}rlll@{}}"; 176 176 outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t& @s2@\t\\\\"; 177 outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";177 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 178 178 179 179 #define D2_s1_plus s1 [1] = '+' … … 182 182 assert( s1_mid == "+c" ); 183 183 assert( s2 == "bc" ); 184 outfile | xstr(D2_s1_plus) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";184 outfile | xstr(D2_s1_plus) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 185 185 186 186 #define D2_s1mid_minus s1_mid[0] = '-' … … 189 189 assert( s1_mid == "-c" ); 190 190 assert( s2 == "bc" ); 191 outfile | xstr(D2_s1mid_minus) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";191 outfile | xstr(D2_s1mid_minus) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 192 192 193 193 #define D2_s2_pipe s2 [0] = '|' … … 196 196 assert( s1_mid == "-c" ); 197 197 assert( s2 == "|c" ); 198 outfile | xstr(D2_s2_pipe) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";198 outfile | xstr(D2_s2_pipe) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t"; 199 199 outfile | "\\end{tabular}"; 200 200 outfile | "\\end{cquote}"; … … 204 204 open( outfile, "build/sharing7.tex" ); 205 205 outfile | "\\begin{cquote}"; 206 outfile | "\\begin{tabular}{ llll}";206 outfile | "\\begin{tabular}{@{}rlll@{}}"; 207 207 outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t& @s2@\t\\\\"; 208 outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";208 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 209 209 210 210 #define D2_s1mid_ff s1_mid = "ff" … … 213 213 assert( s1_mid == "ff" ); 214 214 assert( s2 == "|c" ); 215 outfile | xstr(D2_s1mid_ff) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";215 outfile | xstr(D2_s1mid_ff) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t\\\\"; 216 216 217 217 #define D2_s2_gg s2 = "gg" … … 220 220 assert( s1_mid == "ff" ); 221 221 assert( s2 == "gg" ); 222 outfile | xstr(D2_s2_gg) | "\t& " | s1 | "\t& " | s1_mid | "\t& " | s2 | "\t\\\\";222 outfile | xstr(D2_s2_gg) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s2 | "\"@\t"; 223 223 outfile | "\\end{tabular}"; 224 224 outfile | "\\end{cquote}"; … … 232 232 open( outfile, "build/sharing8.tex" ); 233 233 outfile | "\\begin{cquote}"; 234 outfile | "\\begin{tabular}{ lll}";234 outfile | "\\begin{tabular}{@{}rll@{}}"; 235 235 outfile | "\t\t\t\t& @s1@\t& @s1_mid@\t\\\\"; 236 outfile | "\\multicolumn{1}{r}{initial} & " | s1 | "\t& " | s1_mid | "\t\\\\";236 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\"; 237 237 238 238 assert( s1 == "affd" ); 239 239 // assert( s1_mid == "fc" ); // ????????? bug? 240 outfile | xstr(D2_s2_gg) | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";240 // outfile | xstr(D2_s2_gg) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\"; 241 241 242 242 #define D2_s1mid_hhhh s1_mid = "hhhh" … … 244 244 assert( s1 == "ahhhhd" ); 245 245 assert( s1_mid == "hhhh" ); 246 outfile | xstr(D2_s1mid_hhhh) | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";246 outfile | xstr(D2_s1mid_hhhh) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\"; 247 247 248 248 #define D2_s1mid_i s1_mid = "i" … … 250 250 assert( s1 == "aid" ); 251 251 assert( s1_mid == "i" ); 252 outfile | xstr(D2_s1mid_i) | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";252 outfile | xstr(D2_s1mid_i) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\"; 253 253 254 254 #define D2_s1mid_empty s1_mid = "" … … 256 256 assert( s1 == "ad" ); 257 257 // assert( s1_mid == "" ); ------ Should be so, but fails 258 outfile | xstr(D2_s1mid_empty) | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";258 outfile | xstr(D2_s1mid_empty) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t\\\\"; 259 259 260 260 #define D2_s1mid_jj s1_mid = "jj" … … 262 262 assert( s1 == "ajjd" ); 263 263 assert( s1_mid == "jj" ); 264 outfile | xstr(D2_s1mid_jj) | "\t& " | s1 | "\t& " | s1_mid | "\t\\\\";264 outfile | xstr(D2_s1mid_jj) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_mid | "\"@\t"; 265 265 outfile | "\\end{tabular}"; 266 266 outfile | "\\end{cquote}"; … … 270 270 open( outfile, "build/sharing9.tex" ); 271 271 outfile | "\\begin{cquote}"; 272 outfile | "\\begin{tabular}{ lllll}";272 outfile | "\\begin{tabular}{@{}rllll@{}}"; 273 273 outfile | "\t\t\t\t& @s1@\t& @s1_bgn@\t& @s1_mid@\t& @s1_end@\t\\\\"; 274 275 #define D2_s1bgn_s1 string s1_bgn = s1(0, 1)`shareEdits 274 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& & @\"" | s1_mid | "\"@\t\\\\"; 275 276 #define D2_s1bgn_s1 string s1_bgn = s1(0, 1)`share 276 277 D2_s1bgn_s1; 277 outfile | xstr(D2_s1bgn_s1) | "\t \\\\";278 279 #define D2_s1end_s1 string s1_end = s1(3, 1)`share Edits278 outfile | xstr(D2_s1bgn_s1) | "\t& \t& @\"" | s1_bgn | "\"@\t\\\\"; 279 280 #define D2_s1end_s1 string s1_end = s1(3, 1)`share 280 281 D2_s1end_s1; 282 outfile | xstr(D2_s1end_s1) | "\t& \t& \t& \t& @\"" | s1_end | "\"@\t\\\\"; 281 283 assert( s1 == "ajjd" ); 282 284 assert( s1_bgn == "a" ); 283 285 assert( s1_mid == "jj" ); 284 286 assert( s1_end == "d" ); 285 outfile | xstr(D2_s1end_s1) | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";286 287 287 288 #define D1_s1bgn_zzz s1_bgn = "zzzz" … … 291 292 assert( s1_mid == "jj" ); 292 293 assert( s1_end == "d" ); 293 outfile | xstr(D1_s1bgn_zzz) | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";294 outfile | xstr(D1_s1bgn_zzz) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_bgn | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s1_end | "\"@\t"; 294 295 outfile | "\\end{tabular}"; 295 296 outfile | "\\end{cquote}"; … … 299 300 open( outfile, "build/sharing10.tex" ); 300 301 outfile | "\\begin{cquote}"; 301 outfile | "\\begin{tabular}{ llllll}";302 outfile | "\\begin{tabular}{@{}rlllll@{}}"; 302 303 outfile | "\t\t\t\t& @s1@\t& @s1_bgn@\t& @s1_crs@\t& @s1_mid@\t& @s1_end@\t\\\\"; 303 304 #define D2_s1crs_s1 string s1_crs = s1(3, 2)`shareEdits 304 outfile | "\\multicolumn{1}{r}{initial} & @\"" | s1 | "\"@\t& @\"" | s1_bgn | "\"@\t& & @\"" | s1_mid | "\"@\t& @\"" | s1_end | "\"@\t\\\\"; 305 306 #define D2_s1crs_s1 string s1_crs = s1(3, 2)`share 305 307 D2_s1crs_s1; 306 308 assert( s1 == "zzzzjjd" ); … … 309 311 assert( s1_mid == "jj" ); 310 312 assert( s1_end == "d" ); 311 outfile | xstr(D2_s1crs_s1) | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_crs | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";313 outfile | xstr(D2_s1crs_s1) | "\t& \t& \t& @\"" | s1_crs | "\"@\t\\\\"; 312 314 313 315 #define D2_s1crs_ppp s1_crs = "+++" … … 318 320 assert( s1_mid == "j" ); 319 321 assert( s1_end == "d" ); 320 outfile | xstr(D2_s1crs_ppp) | "\t& " | s1 | "\t& " | s1_bgn | "\t& " | s1_crs | "\t& " | s1_mid | "\t& " | s1_end | "\t\\\\";322 outfile | xstr(D2_s1crs_ppp) | "\t& @\"" | s1 | "\"@\t& @\"" | s1_bgn | "\"@\t& @\"" | s1_crs | "\"@\t& @\"" | s1_mid | "\"@\t& @\"" | s1_end | "\"@\t"; 321 323 outfile | "\\end{tabular}"; 322 324 outfile | "\\end{cquote}"; … … 326 328 327 329 string word = "Phi"; 328 string consonants = word(0,2)`share Edits;329 string miniscules = word(1,2)`share Edits;330 string consonants = word(0,2)`share; 331 string miniscules = word(1,2)`share; 330 332 assert( word == "Phi" ); 331 333 assert( consonants == "Ph" ); … … 340 342 341 343 string all = "They said hello again"; 342 string greet = all(10,5)`share Edits;343 string greet_bgn = all(10,1)`share Edits;344 string greet_end = all(14,1)`share Edits;344 string greet = all(10,5)`share; 345 string greet_bgn = all(10,1)`share; 346 string greet_end = all(14,1)`share; 345 347 346 348 assert( all == "They said hello again" );
Note: See TracChangeset
for help on using the changeset viewer.