Re: New switch/case idea

new topic     » goto parent     » topic index » view thread      » older message » newer message
irv said...
switch op with fallthru do  
	case RETURNT then  
		opRETURNT()  
		break  
	case RHS_SLICE then  
		opRHS_SLICE()  
		break  

Just so I understand: If I remove or forget the break after opRETURNT(), then regardless of whether RHS_SLICE is or isn't valid, opRHS_SLICE() gets executed, correct?

Since you specified "switch op with fallthru do", yes.

If you had done "switch op without fallthru do" or just "switch op do", then no.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu