interpretive
Standard Forth support for words with special interpretation and compilation semantics
- raw README.md
- raw example-ascii.fs
- raw example-dot-quote.fs
- raw example-s-quote.fs
- raw example-tick.fs
- raw example-val-to.fs
- raw interpretive.fs
- raw mit-license
- raw package.4th
\ ************************************************************************************************ \ character literals with ASCII, control characters with CTRL with copy and paste capabilities. \ ************************************************************************************************ S" interpretive.fs" INCLUDED : (ascii) ( <ccc> -- x ) BL WORD COUNT 0= IF -32 THROW ( invalid name argument ) THEN C@ ; : ASCII ( <ccc> -- ) (ascii) POSTPONE LITERAL ; IMMEDIATE interpretive{ : ASCII ( <ccc> -- x ) (ascii) ; }interpretive \ Define CTRL based on ascii : (ctrl) ( <ccc> -- x ) (ascii) [ BASE @ HEX ] 01F AND [ BASE ! ] ; \ use (ascii) as factor : CTRL ( <ccc> -- ) (ctrl) POSTPONE LITERAL ; IMMEDIATE interpretive{ : CTRL ( <ccc> -- x ) (ctrl) ; }interpretive \ Sample Usage: : star ( -- ) ASCII * emit ; cr ASCII * emit star ( -> ** ) : .ETX ( -- ) CTRL C . ; cr CTRL C . .ETX ( -> 3 3 ) cr
by UlrichHoffmann
Versions
Tags
ansforth94, forth-94, forth94, ndcs, special, interpretationsemantics, compilationsemantics
Dependencies
None
Dependents
None