Skip to content

Parameters from and to forth #9

@Pfontvilanova

Description

@Pfontvilanova

I’m very interested in the version of forth: peforth. Well, I find it very useful and interesting to be able to use forth or python interchangeably and with the great integration it has.
I’m starting to learn python and I still don’t understand all its explanations very well. That’s why I would like if you could help me with any question that I don’t know how to apply.

My goal would be:

  1. Use a python line within a forth definition, example:

: looping py> sum(range(1, 1000)) .” The value of the sum is: “. Cr;

And somehow pass the value of the sum in python to the stack or to a forth variable to be able to use it in forth.

  1. The same but the other way around. Within a python function or program, add a block in forth and be able to use the values obtained in forth and pass them to the python....

If you could give me a couple of tips for these objectives it would be of great help to continue deepening the practical use of the peforth for my projects.

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions