kolibrios-fun/programs/develop/SPForth/devel/~mak/case.f

34 lines
580 B
FortranFixed
Raw Normal View History

VARIABLE CSP \ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
: CASE
CSP @ SP@ CSP ! ; IMMEDIATE
: ?OF_
POSTPONE IF POSTPONE DROP ; IMMEDIATE
: OF
POSTPONE OVER POSTPONE = POSTPONE ?OF_ ; IMMEDIATE
: ENDOF
POSTPONE ELSE ; IMMEDIATE
: DUPENDCASE
BEGIN SP@ CSP @ <> WHILE POSTPONE THEN REPEAT
CSP ! ; IMMEDIATE
: ENDCASE
POSTPONE DROP POSTPONE DUPENDCASE
; IMMEDIATE
: OF\
POSTPONE OVER POSTPONE <> POSTPONE IF ; IMMEDIATE
: OF;
POSTPONE OVER POSTPONE = POSTPONE IF 2>R
POSTPONE DUPENDCASE 2R>
POSTPONE DROP ; IMMEDIATE
HEX