Help Contents / Conditional execution / case

caseresult case value clist 

outputs as result the run butfirst entry of the list of the clist list which has the entry value as its first element. If the first entry of a clist sublist is else then if no previous condition is fullfilled the corresponding rest of that sublist gets executed. 

Example: 

	case 2 [[1 "a] [2 "b] [3 "c]]		;b  ;-) 
	case 2 [[1 "a][else "b]]		;b  ;-) 
	case 2 [[1 pr "a] [[(Cos 0)+Cos 0] pr "b] [else pr "els]]		;b 


previous: test	next: cond
