You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SWI-Prolog
Hello Forum!
Can I re-define a forward slash for some internal use in the module, so that the operator-/ unaffected elsewhere? Possibly no I can't, so I wrote some code without redefinition.
The default is op(400,yfx,/) and I was hoping to redefine it to op(400,xfy,/). Also I tried op(400,xfy, somemodule:(/)) but that didn't work neither.
I tried just about anything. Also when I tried redefining the `/' in (local) pengines and Prolog engines, the redefinition is not kept just locally, it seems to be always global???
Thanks.
Jan Wielemaker
unread,
Mar 11, 2018, 1:33:29 PM3/11/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pasi Xyy, SWI-Prolog
Operators are local to the a module. So, yes you can redefine them.
I'd be very careful as it is easy to mess things up, but it works
as advertised. Only `I tried everything' doesn't help us much to know
what you tried. Send concrete source code we can load and run.