«« «» »» |
Because we have redefined the left parenthesis, from this point on, inline comments must be done
with a double left parenthesis.
: (( ( -- ) POSTPONE ( ; IMMEDIATE : ( (( -- ) ['] DUMMY >BODY >P ; IMMEDIATE PREVIOUS FORTH \ ----- End of code ----- Defining KISS-commandsKISS + KISS - KISS * KISS /Indeed, that's all there is to it to make KISS-commands out of existing Forth words! From this point on, + - * and / act (almost) like they do in, e.g., BASIC. Or to put a finer point on it:
1) BASE @ + 1 . \ 11 2) 1 + ( BASE @ ) . \ 11 3) 3 + 4 * 5 . \ 35 4) ( 3 + 4 ) * 5 . \ 35 5) 3 + ( 4 * 5 ) . \ 23KISS-commands work inside definitions. : DOZEN (( x -- x*12 ) * 12 ; |