1
votes

I'm new to forth. I've played with gforth briefly. And I'm interesting in forth 'images'.

I have this use-case: I want to...

  1. Interactively define words
  2. Save the forth image
  3. Quit the system
  4. Restart the forth image
  5. See the previously defined words

Is this possible? Could you explain how? Thank you.

(I've been playing around with gforthmi, savesystem, gforth -i. And I've looked at blocks and use. I have no real idea what I'm doing.)

1

1 Answers

3
votes

According to the documentation, Gforth usually requires a relocatable image, but such image cannot be created in interactive session (i.e., via savesystem word). So your scenario is impossible in Gforth.

A possible approach is to log an interactive session into a file, and then use this log file to compose a conventional Forth source file that is included in the next session.