Search found 146 matches

by Peter Muraya
10 Aug 2015 16:59
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 3813

Hi Martin, Thanks for the effort you take to understand a partially/poorly specified problem; I think your first example is clearer to me than the alternative, but I always learn something new from your coding, including this construct:- sex() = if isErroneous(executeLegalPerson_fact) then female el...
by Peter Muraya
5 Aug 2015 16:56
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 3813

Thanks Thomas and Martin. I'm not sure I completely understand the issue Thomas is raising, but I think Martin's example solves my problem elegantly. The key is in the 2 statements: implement child inherits legalPerson % Inherit the implementation from legalPerson and legalPerson::execute(). % Call ...
by Peter Muraya
4 Aug 2015 9:13
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 3813

Aborting an implementation and continue inheritance

Hi, I often encounter situations when I need to abort an implementation in favor of inheritance as shown in the following code. The gist of the problem is that when the sex of the child is female , I want it to exhibit the mother behavior; otherwise it exhibits its own. The mother behavior is rather...
by Peter Muraya
31 Jul 2015 8:47
Forum: Visual Prolog
Topic: Missing rules in build 7501
Replies: 3
Views: 3387

Thank you Thomas. I tried that route and gave up for the following reasons:- 1) In my settings, after running the command associated with the parser, the screen just flickered with no indication of what was going on and no output files were generated. 2) I thought of adding the command console::read...
by Peter Muraya
30 Jul 2015 8:53
Forum: Visual Prolog
Topic: Missing rules in build 7501
Replies: 3
Views: 3387

Missing rules in build 7501

Hi, In version 7.4 the Project/Settings/Build Options allowed one add new new rules for building a project. Version 7.5 build 7501 does not provide this facility. I would like to use the vipLalrGen.exe to update files generated from grammar files with extension vipGrm. How can I specify this rule in...
by Peter Muraya
29 Jul 2015 7:23
Forum: Visual Prolog
Topic: Opening an XML document from the IDE
Replies: 1
Views: 2869

Opening an XML document from the IDE

Hi, I have associated an .xml document with Microsoft Visual Studio 2010, so that when I open it in Windows explorer it uses that editor. I added the same document to my Prolog project and in an earlier version, 7.4, got this desired behavior, but now it opens it using the Notepad. I'm not sure if t...
by Peter Muraya
29 Jul 2015 7:04
Forum: Visual Prolog
Topic: The parameter 'Max' is bound in the context
Replies: 2
Views: 2981

Thanks. That makes sense.
by Peter Muraya
28 Jul 2015 7:45
Forum: Visual Prolog
Topic: The parameter 'Max' is bound in the context
Replies: 2
Views: 2981

The parameter 'Max' is bound in the context

Hi This error, The parameter 'Max' is bound in the context, surprised me in this code that I thought was valid. I solved it by re-writing it as commented, but I am still not sure why the first version raised the error. implement main open core /* Returns the string/frequency pairs that have the high...
by Peter Muraya
24 Jul 2015 6:26
Forum: Visual Prolog
Topic: [explicitTag] attribute in vpiDomains
Replies: 2
Views: 2732

Thanks Thomas. I read that "this is for internal use by the the Visual Prolog compiler developers". Would it make sense to provide a means of adding new local attributes for other developers? At one time, I don't remember why I really wanted to, I wished that Prolog would allow me to add my own attr...
by Peter Muraya
20 Jul 2015 8:38
Forum: Visual Prolog
Topic: [explicitTag] attribute in vpiDomains
Replies: 2
Views: 2732

[explicitTag] attribute in vpiDomains

Hi, I encounter this attribute explicitTag quite often in class vpiDomains and I don't see any documentation referring to it. Here is an example of where it is used. domains menu = resMenu(resid Resid); dynMenu(menuItem* SubMenu); noMenu [explicitTag]. What is it telling the compiler?
by Peter Muraya
20 Jul 2015 7:09
Forum: Visual Prolog
Topic: Try/Catch block makes the cut useless:what is the rationale?
Replies: 6
Views: 4082

Thank you Thomas; its very clear now.
by Peter Muraya
17 Jul 2015 9:15
Forum: Visual Prolog
Topic: Superfluous source argument in window::menuItmListener
Replies: 1
Views: 2487

Superfluous source argument in window::menuItmListener

Hi, I find the Source argument in the declaration and implementation of the menuItemListener superfluous in my application and would like to hear situations where This keyword would not suffice wherever the Source argument is needed. The declaration in the window class is:- menuItemListener = (windo...
by Peter Muraya
17 Jul 2015 5:04
Forum: Visual Prolog
Topic: Try/Catch block makes the cut useless:what is the rationale?
Replies: 6
Views: 4082

Thanks Harrison and Martin. This sheds some light. I was not aware of the idea of a cut scope beyond the traditional use in clauses such as in:- p():-nd,!,x(). p(). Perhaps the documentation should be expanded to read:- ...Several terms introduce cut scopes (see the respective terms: list comprehens...
by Peter Muraya
16 Jul 2015 17:44
Forum: Visual Prolog
Topic: Try/Catch block makes the cut useless:what is the rationale?
Replies: 6
Views: 4082

Try/Catch block makes the cut useless:what is the rationale?

Hi, The commented code worked fine. I expanded it to trap runtime errors using a try/catch block and was surprised when the compiler complained that The predicate 'main::run/0', which is declared as 'procedure', is actually 'multi' . It is as if the try/catch block effectively removed the first cut ...
by Peter Muraya
16 Jul 2015 7:11
Forum: Visual Prolog
Topic: What is TaskMenu item?
Replies: 6
Views: 4677

What is TaskMenu item?

Hi, When you open TaskMenu.mnu to access the task menu editor you see the following inputs for each menu item: Constant, Item and Help. I understand Constant to be the text that defines a constant in the resourceIdenfiers and has the vpiDomains::menuTag; but what is item ? Why is it important? What ...