A case statement donated to the F83 L/P Library 05NOV84JAPThe HJH initials are Henricus Holtman of Berkeley. I don't know where the code originally came from. \ CASE 1ST SCREEN 05may84hjh: ?COMP ( --) STATE @ TRUE = 0= ABORT" Compiling only" ; : ?PAIRS ( --) - 0<> ABORT" Conditionals not paired" ; --> \ CASE 2ND SCREEN 05may84hjh: CASE ( --) ?COMP CSP @ !CSP 4 ; IMMEDIATE : OF ( --) 4 ?PAIRS COMPILE OVER COMPILE = COMPILE ?BRANCH >MARK COMPILE DROP 5 ; IMMEDIATE : ENDOF ( --) 5 ?PAIRS COMPILE BRANCH >MARK SWAP >RESOLVE 4 ; IMMEDIATE : ENDCASE ( --) 4 ?PAIRS COMPILE DROP BEGIN SP@ CSP @ = 0= WHILE >RESOLVE REPEAT CSP ! ; IMMEDIATE \ CASE 1ST SCREEN 08jun84hjh?COMP makes sure the system is compiling ?PAIRS makes sure that the top two numbers are the same. \ CASE 2ND SCREEN 08jun84hjhThis is a keyed CASE it works as follows CASE n1 OF words1 ENDOF n2 OF words2 ENDOF nn OF wordsn ENDOF ENDOF if n1 is on the stack words1 will be done if n2 is on the stack words2 will be done if none of the n's is on top of the stack the top element of the stack will thrown away come ENDOF