Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In a foreign function, how do I unify an 'input' Variable with a list? #42

Closed
hits-nlp opened this issue Jan 18, 2019 · 1 comment
Closed

Comments

@hits-nlp
Copy link

I have switched to the refactor branch in the meantime.

Now I want to write a function like this:

def my_function(input_var, output_var):
# compute some list of values based on input_var

'assign' / unify this list with output_var, such that it is accessible from within prolog.

return True

Prolog.register(my_function)

I managed, somehow dirty, to assign a list value to output_var._value, which is probably wrong, and which did not pass the value to output_var such that it was accessible.

Is what I want to do possible?

Thanks,
Christoph

@hits-nlp
Copy link
Author

OK, got it myself ;-)
I applied the changes submitted by @tkchouaki in one of the pull requests.
Seems to work now...

@yuce yuce closed this as completed Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants