Search found 147 matches

by Peter Muraya
5 Jun 2015 7:58
Forum: Visual Prolog
Topic: implement supports interface
Replies: 1
Views: 2734

implement supports interface

Hi, It is clear to me that an interface SUPPORTS another interface and that an implement INHERITS from a class. I note that in Visual Prolog it is valid for an implement to SUPPORT some interface, but I'm not quite clear when this would be useful. Can you show me a problem that is neatly solved by t...
by Peter Muraya
3 Jun 2015 8:31
Forum: Visual Prolog
Topic: Deterministic Error
Replies: 7
Views: 5149

Hello Frank, I think Martin is right. Here's how I would solve the problem. predicates onDiagnosisClick : button::clickResponder. clauses onDiagnosisClick(_Source) = button::defaultAction:- ......... if retract (text1(Title)),! then Result= Title else exception::raise_error("Check that you have not ...
by Peter Muraya
29 May 2015 7:55
Forum: Visual Prolog
Topic: Linker error, undefined name
Replies: 2
Views: 3630

Ok. Thanks.
by Peter Muraya
27 May 2015 12:27
Forum: Visual Prolog
Topic: Linker error, undefined name
Replies: 2
Views: 3630

Linker error, undefined name

Hi, I get the following linker error that I don't quite understand. Do you? Error 2525: 'Obj\main.A22FE9BF.obj' - undefined name '$function$function_{@Argument}_interface$0$domain$' The commented part of the following source code compiled without a hitch. I decided to simplify it by introducing the ...
by Peter Muraya
26 May 2015 8:44
Forum: Visual Prolog
Topic: Reading Oracle database without ODBC ?
Replies: 4
Views: 3552

I'm not familiar with Oracle, but I have used DAO/COM technology to access an Microsoft Access database hoping that the Seek method would retrieve records faster than the equivalent ODBC method. It was much more work with no visible difference, so I reverted back to ODBC.
by Peter Muraya
26 May 2015 8:29
Forum: Visual Prolog
Topic: Callback Actions for Exceptions and Failure
Replies: 13
Views: 8522

Thanks Thomas; the example is very clear.
by Peter Muraya
25 May 2015 10:39
Forum: Visual Prolog
Topic: Callback Actions for Exceptions and Failure
Replies: 13
Views: 8522

I'm not sure whether I should ask the following question in this post or whether to raise it as a new issue .... but ... what is a reference domain and why is it important?
by Peter Muraya
18 May 2015 17:36
Forum: Visual Prolog
Topic: Conflicting support instances
Replies: 8
Views: 4419

Conflicting support instances

Thanks Thomas. You clarified the subtyping question very well. About the mixing of the scalar and range....my intention is not to really mix them as such, but to implement the fact that the range and scalar objects in my project do have some common properties defined by the user_defined interface. I...
by Peter Muraya
16 May 2015 7:32
Forum: Visual Prolog
Topic: Conflicting support instances
Replies: 8
Views: 4419

Conflicting support instances

Martin, thanks. I appreciate the compiler being strict with type checking because that is what lead me to using parameterized classes and interfaces in the first place, but in a case such as this I think there is enough information for the compiler to figure out that user_defined{object} is a supert...
by Peter Muraya
15 May 2015 18:11
Forum: Visual Prolog
Topic: Conflicting support instances
Replies: 8
Views: 4419

Conflicting support instances

Hi Martin, Thanks for your response. Your code is very close to what I'm looking for. When I adopted it another issue cropped up: type incompatibility. At some point I need to convert a static string to a user defined expression. Here are my failed attempts, which the compiler does not like throwing...
by Peter Muraya
15 May 2015 7:10
Forum: Visual Prolog
Topic: Conflicting support instances
Replies: 8
Views: 4419

Conflicting support instances

Hi all, Can you help me to solve the following error:- Conflicting support instances 'expression{@Type}{::user_defined}' and 'expression{@Type}{::range}' It arises from compiling the code below comprising of parameterized interfaces. I intended to use the parameterized interfaces to allow the compil...
by Peter Muraya
30 Mar 2015 14:03
Forum: Visual Prolog
Topic: Error e353 "Free parameter is used in type expression"
Replies: 3
Views: 3539

Free parameter is used in type expression

Hi, It does not look like this error e353 was sorted out completely when dealing with a chain of supported interfaces. Or was it? I have the same problem as earlier reported by Martin. See the code below. The commented line, as suggested by Thomas in a later post, solved the problem, but it makes th...
by Peter Muraya
23 Mar 2015 12:02
Forum: Visual Prolog
Topic: unicode problem
Replies: 8
Views: 5035

Meriem, I would understand the problem better if can you provide:-
- the sample Prolog source code you are using
- the sample output are you getting and
- a statement of what were you expecting to get.
by Peter Muraya
14 Mar 2015 8:44
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 6001

Coding question

Hi David, I have not used the setM_redBlack or setM collections but I think they are what you need if you want don't want duplicates. Is that correct Thomas? What is the difference between the two? I have found array2M to be very useful for working with 2-dimensional arrays. More about collections.....
by Peter Muraya
13 Mar 2015 14:07
Forum: Visual Prolog
Topic: Coding question
Replies: 13
Views: 6001

Coding question

If I wanted to use the foreach construct while avoiding the issues Thomas raised, this is how I would code it:- Result = varM::new([]), foreach CODE = list::getMember_nd(SLCODES), nameRefDB(CODE,LabelCODE), get_label(LabelCODE,Name) do Result:value:=[Name|Result:value] end foreach, LNAMES = Result:v...