mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-01 19:49:57 +00:00
1 line
9.0 KiB
Plaintext
1 line
9.0 KiB
Plaintext
|
* EAKER - CASE f<>r volks4th83 von Heinz Schnitter **jrg 01feb89 \ Vorw<72>rtsreferenzen als verkettete Liste ( 06.jrg 01feb89| variable caselist | : initlist ( list -- addr ) dup @ swap off ; | : >marklist ( list -- ) here over @ , swap ! ; | : >resolvelist ( addr list -- ) BEGIN dup @ WHILE dup dup @ dup @ rot ! >resolve REPEAT ! ; \ CASE ELSECASE ENDCASE ( 09.jrg 01feb89 : CASE caselist initlist 4 ; immediate restrict : ELSECASE 4 ?pairs compile drop 6 ; immediate restrict : ENDCASE dup 4 = IF drop compile drop ELSE 6 ?pairs THEN caselist >resolvelist ; immediate restrict \ OF ENDOF Control ( 09.jrg 01feb89: OF 4 ?pairs compile over compile = compile ?branch >mark compile drop 5 ; immediate restrict : ENDOF 5 ?pairs compile branch caselist >marklist >resolve 4 ; immediate restrict : Control bl word 1+ c@ $bf and state @ IF [compile] Literal THEN ; immediate
|