// SAVED HERE BEFORE INCLUDING NEW TEMPLATES MADE UP BY RALPH WALDE // 200 - 202 switch condition is declared as a float // Condition assigned 3.0, Cases 1-5, A case matches 3, Cases output random constants # 200 Switch.Condition.Real > // {(){=3.0;switch(){ case 1: << ; break; case 2: << ; break; case 3:<< ; break; case 4: << ; break; case 5: << ; break; default: << ; break; }}} [,,,]{(){=;switch(){ case : << ; break; case : << ; break; case :<< ; break; case : << ; break; case : << ; break; default: << ; break; }}} > Type: output Hardness: 20 // Condition assigned random int , Cases 1-4 + condition value, A case matches, Cases output expressions of # 201 Switch.Condition.Real > // {(){=;switch(){ case 1: << 1 + ; break; case 2: << 2*; break; case 3: << - 3; break; case 4: << /4; break; case : << *; break; default: << 2* + 5; break; }}} [,,,]{(){=;switch(){ case : << + 1; break; case : << * 2; break; case : << - 3; break; case : << / 4; break; case : << * ; break; default: << * 2 + 5; break; }}} > Type: output Hardness: 20 // Condition ==10 * random int , Cases by 10, A case matches, Cases assign int , output after switch # 202 Switch.Condition.Real > // {(){=*10;=;switch(){ case 10: = ; break; case 20: = + ; break; case 30: = *3; break; case 40: = - ; break; case 50: = /7; break; default: = - ; break; }<< ;}} [,,,]{(){=;=;switch(){ case : = ; break; case : = ; break; case : = ; break; case : = ; break; case : = ; break; default: = ; break; }<< ;}} > Type: output Hardness: 20 // 205 - 207 switch condition is an expression of , declared as a float // Condition ( + 2) assigned 2.0, Cases decremented 5 - 1, A case matches 4, Cases output random constants # 205 Switch.Condition.Real > // {(){=2.0;switch( + 2){ case 5: << ; break; case 4: << ; break; case 3:<< ; break; case 2: << ; break; case 1: << ; break; default: << ; break; }}} [,,]{(){=;switch( + ){ case : << ; break; case : << ; break; case :<< ; break; case : << ; break; case : << ; break; default: << ; break; }}} > Type: output Hardness: 20 // Condition random int + , assigned random int, Cases random int, Matches Default, Cases output expressions of # 206 Switch.Condition.Real > // {(){=;switch( + ){ case : << 5*; break; case : << - 6; break; case : << *; break; case : << %3; break; case : << 2* - 3; break; default: << + *; break; }}} {(){=;switch( * ){ case : << * ; break; case : << * 5; break; case : << / 3; break; case : << - 6; break; case : << + 5; break; default: << + * 10; break; }}} > Type: output Hardness: 20 // Condition 10* assigned random int , Cases by 10, A case matches, Cases assign int , output after switch # 207 Switch.Condition.Real > // {(){=;=;switch(10*){ case 10: = ; break; case 20: = - ; break; case 30: = %2; break; case 40: = + ; break; case 50: = 3* + 2; break; default: = + ; break; }<< ;}} [,,]{(){=;=;switch( * 10){ case : = ; break; case : = ; break; case : = ; break; case : = ; break; case : = ; break; default: = ; break; }<< ;}} > Type: output Hardness: 20 // --------------------------------------------------------------------------- // 225 // Switch.Case.Real // Added by Ralph Walde 1/22/2010 // 225 - 227 One case a literal real with value equal to integer // Cases 1.0, 2-5, Condition assigned 1 matches case 1.0, Cases output random constants # 225 Switch.Case.Real > {(){=1;switch(){ case 1.0: << ; break; case 2: << ; break; case 3:<< ; break; case 4: << ; break; case 5: << ; break; default: << ; break; }}} > Type: output Hardness: 20 // Cases 1, 2, 3.0, 4, Condition assigned , A case matches, Cases output expressions of # 226 Switch.Case.Real > {(){=;switch(){ case 1: << 7*; break; case 2: << %3; break; case 3.0: << 2* - 3; break; case 4: << - 11; break; case : << *; break; default: << 2* + 5; break; }}} > Type: output Hardness: 20 // Cases by 10 including 50.0, Condition ==10 * random int , Matches default, Cases assign int , output after switch # 227 Switch.Case.Real > {(){=*10;=;switch(){ case 10: = ; break; case 20: = + ; break; case 30: = *3; break; case 40: = - ; break; case 50.0: = /7; break; default: = - ; break; }<< ;}} > Type: output Hardness: 20 // 230 - 232 One case a random real constant // Cases decremented , 4 - 1, Condition ( + 1) assigned 2, A case matches, Cases output random constants # 230 Switch.Case.Real > {(){=2;switch( + 1){ case : << ; break; case 4: << ; break; case 3:<< ; break; case 2: << ; break; case 1: << ; break; default: << ; break; }}} > Type: output Hardness: 20 // Cases random- 1 float, 4 int, Condition random int + , assigned random int, Matches Default, Cases output expressions of # 231 Switch.Case.Real > {(){=;switch( + ){ case : << 5*; break; case : << - 6; break; case : << 23 + ; break; case : << %3; break; case : << 4* + 7; break; default: << * + 4*; break; }}} > Type: output Hardness: 20 // Cases one random float others multiple of 10, Condition 10* assigned random int , A case matches, Cases assign int , output after switch # 232 Switch.Case.Real > {(){=;=;switch(10*){ case 10: = ; break; case 20: = + ; break; case 30: = /2; break; case 40: = 4 * + ; break; case : = 3* + 2; break; default: = + ; break; }<< ;}} > Type: output Hardness: 20 // --------------------------------------------------------------------------- // 250 // Switch.Case.Variable // Added by Ralph Walde 1/22/2010 // 250-252 One case an integer variable // Cases 1-4, with assign 5, Condition , case matches, Cases output random constants # 250 Switch.Case.Variable > {(){=;=5;switch(){ case 1: << ; break; case 2: << ; break; case 3:<< ; break; case 4: << ; break; case : << ; break; default: << ; break; }}} > Type: output Hardness: 20 // Cases 5,,3,2,1 Condition assigned , matches default, Cases output expressions of # 251 Switch.Case.Variable > {(){=;=;switch(){ case 5: << 4*; break; case : << /3; break; case 3: << 3* + 5; break; case 2: << 15*; break; case 1: << + 12; break; default: << *3 - 1; break; }}} > Type: output Hardness: 20 // Cases ,20,30,40,50, Condition ==10 * random int , Case matches, Cases assign int , output after switch # 252 Switch.Case.Variable > {(){=*10;=;=10;switch(){ case : = ; break; case 20: = - ; break; case 30: = 2* + 8; break; case 40: = + ; break; case 50: = %2; break; default: = - ; break; }<< ;}} > Type: output Hardness: 20 // 255 - 257 One case an expression of an integer variable and condition an expression of // Cases decremented + 4, 4 - 1 with assign 1, Condition (5 - ) assigned 2, A case matches, Cases output random constants # 255 Switch.Case.Real > {(){=2;=1;switch(5 - ){ case + 4: << ; break; case 4: << ; break; case 3:<< ; break; case 2: << ; break; case 1: << ; break; default: << ; break; }}} > Type: output Hardness: 20 // Cases random int plus 2*, Condition random int + , assigned random int, Matches Default, Cases output expressions of and # 256 Switch.Case.Real > {(){=;=;switch( + ){ case 2*: << 5*; break; case : << - ; break; case : << + ; break; case : << 3* + 2*; break; case : << 4* + 7; break; default: << * + 7; break; }}} > Type: output Hardness: 20 // Cases 10,20,30,40,3* - 10 with assigned 20, Condition 10* assigned random int , A case matches, Cases assign int , output after switch # 257 Switch.Case.Real > {(){=;=;=20;switch(10*){ case 10: = ; break; case 20: = + ; break; case 30: = *4; break; case 40: = 5* + ; break; case 3* - 10: = 3* + 2; break; default: = + ; break; }<< ;}} > Type: output Hardness: 20 // --------------------------------------------------------------------------- // 250 // Switch.Case.Variable # 250 Switch.Condition.Matches case > {(){=;=3;switch(){ case 1: << ; break; case 2: << ; break; case : << ; break; case 4: << ; break; case 5: << ; break; default: << ; break; }}} > Type: debug_output Hardness: 20