💾 Archived View for bbs.geminispace.org › s › FORTH › 5473 captured on 2024-05-10 at 11:36:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-03-21)

➡️ Next capture (2024-06-16)

🚧 View Differences

-=-=-=-=-=-=-

nForth: Back To Pseudo-Interpretation

I blew it making nForth compile-dominant (pseudo-interpret only text in square braces). It created annoying complications, and I switched back to normally-interpret and compile only things inside curly braces.

This is not traditional Forth, which automatically starts compiling at a `:` and ends the compile at a `;` -- I always hated that convention. The curly braces make code look C-shaped, and that is ok, because { this looks like a function definition ; }

So typing things in at the prompt works as expected, and regular parens can group expressions that are compiled together:

OK> sys
DSP      RSP      HERE     SRC      RUN
0882DFF4 FFC93170 0880F000 0882D003 0880F000
FFC93180 00000002 00000001

OK> ( ." hello" cr )
hello

OK> : foo { ." hello" cr ; }

OK> foo
hello

And all is well.

Posted in: s/FORTH

🚀 stack [mod]

2023-09-22 · 8 months ago