79098778

Date: 2024-10-17 15:23:47
Score: 1
Natty:
Report link

A simple alternative is to make a new word. :-)

The primitives needed are in the system for us to use. That's how Forth solves problems.

If you are careful to only use this word in definitions, this will do the job. It parses the string up to a single quote.

: S' ( -- ) [CHAR] ' PARSE POSTPONE SLITERAL ; IMMEDIATE

: TEST S' Now we can do "double quotes" easily' TYPE ;

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Brian Fox