On Fri, Jan 06 2017, Frank Ruben wrote:
> I could only find the comment "EVALUATE >IN SourceID=(-1) 1111" in
> pf_inner.c
> but I cannot find a definition for EVALUATE, so I have no idea why
> EVALUATE is
> not found in the case that I pass a non-0 IfInit parameter to
> pfDoForth().
EVALUATE is defined in Forth (misc1.fth). EVALUATE sets up SOURCE then
calls INTERPRET which corresponds to ffInterpert in C.
> Does anyone have a pointer where to proceed?
I think (I've never done this) the procedure goes like this:
1. Add custom functions to pfcustom.c
2. Create a new dictionary file. In the normal build process
this is done with
pforth -i <loadfile.fth>
where <loadfile.fth> is usually system.fth which loads all the Forth
source files, including EVALUATE, and writes pforth.dic at the end.
The -i command line option corresponds to IfInit=true.
3. Use the new dictionary file, which will also include your custom
functions. I think it's enough to the proper filename of the
dictionary file to pfDoForth. (You could also create a static
dictionary, but that requires one step more).
Helmut