Search found 147 matches

by Peter Muraya
16 Feb 2015 16:04
Forum: Visual Prolog
Topic: Find string position given line and column location
Replies: 6
Views: 3542

Find string position given line and column location

Hi I found the choice of attributes available from Tools/Configure Tools... rather limiting when trying to extend Visual Prolog's VDE with an external tool written in Visual Prolog. The $(line) and $(col) would be more useful if Prolog's String:: class has a predicate for converting line and column ...
by Peter Muraya
15 Feb 2015 10:08
Forum: Visual Prolog
Topic: Generic predicates
Replies: 6
Views: 2923

Excellent, Martin. This is very clear now.
by Peter Muraya
14 Feb 2015 11:38
Forum: Visual Prolog
Topic: Generic predicates
Replies: 6
Views: 2923

Generic predicates

Hi Martin and Thomas, I have re-visited the generic predicate/untidy repetitive code issue in light of the following approaches:- (a) the polymorphism/parametrization as suggested by Martin and (b( the anonymous predicates as suggested by Thomas In my earlier attempt, I discontinued using generic in...
by Peter Muraya
12 Feb 2015 11:48
Forum: Visual Prolog
Topic: Compiler warning/Calling from a parent class to a child class
Replies: 7
Views: 2897

Compiler warning/Calling from a parent class to a child class

Thanks Martin; your input has helped me to code the following situation (which is part of a large project)..... Expressions of all types must be able to make copies of themselves, i.e., all must implement predicated copy()->expression. A secondary expression is made of children, which are expression...
by Peter Muraya
11 Feb 2015 15:52
Forum: Visual Prolog
Topic: Compiler warning/Calling from a parent class to a child class
Replies: 7
Views: 2897

Compiler warning/Calling from a parent class to a child class

Do you know of any coding method that would help the compiler to warn me if I might have forgotten to implement some EXPECTED predicate or fact -- rather than wait until run time to report a message to that effect? Consider the following code:- interface reproduction properties type:string. predicat...
by Peter Muraya
5 Feb 2015 15:40
Forum: Visual Prolog
Topic: Prune Editor Wndows
Replies: 2
Views: 2242

Prune Editor Wndows

Many thanks, Thomas.
by Peter Muraya
4 Feb 2015 15:15
Forum: Visual Prolog
Topic: Prune Editor Wndows
Replies: 2
Views: 2242

Prune Editor Wndows

What does the command "Prune Editor Windows" in VP 7.4 Window menu do?
by Peter Muraya
30 Jan 2015 16:10
Forum: Visual Prolog
Topic: Generic predicates
Replies: 6
Views: 2923

Generic predicates

Thank Thomas and Martin. Thank you Thomas for pointing me in the direction of function_dt domain. I have seen it defined in the Prolog foundation core class but did not understand it well enough to see how it would help in this problem. I will now look at the untidy code problem from this perspectiv...
by Peter Muraya
30 Jan 2015 3:59
Forum: Visual Prolog
Topic: Generic predicates
Replies: 6
Views: 2923

Generic predicates

Hi, Does Visual Prolog supports or plan to support generic predicates? I'm using the 7.4 version and I have a section of my code that looks rather untidy because it has a recurrent pattern that, I think, could be neatly solved using generic predicates. The following 2 sample codes illustrate what I ...
by Peter Muraya
2 Dec 2014 11:30
Forum: Visual Prolog
Topic: (Date) string to local time conversion
Replies: 1
Views: 1629

(Date) string to local time conversion

Hi, I'm trying to convert a string formatted as a short date, dd/m/yyyy, to a local time value using code that looks like this:- /* Converts the given string to a local time value*/ str_2_localtimevalue(Str)=LocalTimeValue:- /* Create a new time object*/ Time = time::new(), /* Set the date/time acco...
by Peter Muraya
1 Dec 2014 15:50
Forum: Visual Prolog
Topic: COM exception: Member not found
Replies: 5
Views: 2904

Thank you Thomas for pointing me in the direction of indexed properties. I have now solved the problem by adding a new method to the comDispnterface that is declared as follows:- getIndexedProperty : (string Name, integer Index)->comDomains::variant Output. I implemented it using the following claus...
by Peter Muraya
28 Nov 2014 11:21
Forum: Visual Prolog
Topic: COM exception: Member not found
Replies: 5
Views: 2904

COM exception: Member not found

Hi, I'm trying to use Excel 2013 COM to access data in a data management product that is being developed in Visual Prolog 7.4 (VP). At some point I need to step through all the worksheets in an opened workbook for further processing. It is the first time I'm trying to use COM in VP. Everything in my...