Changeset 88bc876 for tests/ctrl-flow
- Timestamp:
- Jul 16, 2024, 5:28:10 PM (5 months ago)
- Branches:
- master
- Children:
- 97f9619
- Parents:
- 2363147
- Location:
- tests/ctrl-flow
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/ctrl-flow/.expect/loop_else.txt
r2363147 r88bc876 63 63 (10 10)(9 9)(8 8)(7 7)(6 6)(5 5)(4 4)(3 3)(2 2)(1 1)(0 0)else 64 64 65 before begin else after -
tests/ctrl-flow/loop_else.cfa
r2363147 r88bc876 74 74 i -= 1.7; 75 75 } else { sout | "else"; } sout | nl | nl; 76 76 77 77 enum { N = 10 }; 78 78 for ( N ) { sout | "N"; } else { sout | "else"; } sout | nl; … … 109 109 for ( s; (S){0} -~ (S){10,10} ~ (S){1} ) { sout | s; } else { sout | "else"; } sout | nl; 110 110 for ( s; (S){0} -~= (S){10,10} ) { sout | s; } else { sout | "else"; } sout | nl; 111 for ( s; (S){0} -~= (S){10,10} ~ (S){1} ) { sout | s; } else { sout | "else"; } sout | nl | nl; 111 for ( s; (S){0} -~= (S){10,10} ~ (S){1} ) { sout | s; } else { sout | "else"; } sout | nl; 112 sout | nl; 113 114 // A break (or a continue) in an else clause should target an outer loop. 115 sout | "before"; 116 while ( true ) { 117 sout | " begin"; 118 while ( false ) { 119 sout | "never"; 120 } else { 121 sout | " else"; 122 break; 123 } 124 sout | " end"; 125 } 126 sout | " after" | nl; 112 127 }
Note: See TracChangeset
for help on using the changeset viewer.