Search found 298 matches

by Martin Meyer
22 Aug 2015 22:38
Forum: Visual Prolog
Topic: Generic property problem
Replies: 1
Views: 3777

Generic property problem

Hello Thomas, please check this construction. The compiler (build 7501) throws fatal error c098 : Not synchronized lists for fixed parameters (integer) on it and dumps: interface myObject{@Type} open core properties value : @Type. properties create : function{myObject{LocalType}} (o). end interface ...
by Martin Meyer
11 Aug 2015 7:49
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 5957

yes, if-the-else expressions came as a new feature with build 7401.
I have learned by Thomas' answers to your questions already too.

Regards
Martin
by Martin Meyer
7 Aug 2015 15:06
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 5957

It's even possible to have a standard object design, i.e. not delegating/redirecting anything, and at the same time (correspondingly) meet the requirements of the two bullets in my prior post, when object types legalPerson and child are made persistent. For an example of a modifiable vs. a persisten...
by Martin Meyer
7 Aug 2015 11:40
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 5957

Below a better version of the example. I suppose the construction is appropriate, provided it's required (for reasons which are not covered by below example code skeleton) that execute/0 predicate of class child inherits its implementation from parent object iff sex is female , property sex has inpu...
by Martin Meyer
5 Aug 2015 23:55
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 5957

The construction I've posted comes most close to your initial example. That's why you are happy with it at first sight. However in most cases in praxis such kinda construction imposes unnecessary complications. That's -I think- the issue Thomas is raising. The complication, which is suspected of bei...
by Martin Meyer
5 Aug 2015 10:58
Forum: Visual Prolog
Topic: Aborting an implementation and continue inheritance
Replies: 9
Views: 5957

Yep, children are not mothers. We should always try to choose names in example code as intuitive as possible. To improve it, I propose renaming mother to legalPerson . Legal persons can be juridical persons (for instance joint-stock companies) or natural persons (as for example children). Assuming t...
by Martin Meyer
17 Jul 2015 17:20
Forum: Visual Prolog
Topic: Try/Catch block makes the cut useless:what is the rationale?
Replies: 6
Views: 5799

Aha ..that explains it. Thanx Thomas!

Regards
Martin
by Martin Meyer
16 Jul 2015 22:52
Forum: Visual Prolog
Topic: Try/Catch block makes the cut useless:what is the rationale?
Replies: 6
Views: 5799

I think the logic behind this behavior is, that in

Code: Select all

try         Body catch Var do         Handler end try
Body is a cut scope. I failed however to find a statement in the language reference saying so.

Many regards
Martin
by Martin Meyer
3 Jul 2015 9:27
Forum: Visual Prolog
Topic: Inconsistency in trapping and reporting error The interface 'winner{@Vacancy}' takes 1 argument(s)
Replies: 3
Views: 3928

Or, when you want, that expression does not have type parameter @Vacancy , code it in the way: interface winnerDomains domains method = all; best. end interface %--- interface winner{@Vacancy} open winnerDomains properties vacancy : @Vacancy. end interface %--- interface expression predicates trim :...
by Martin Meyer
3 Jul 2015 8:41
Forum: Visual Prolog
Topic: Inconsistency in trapping and reporting error The interface 'winner{@Vacancy}' takes 1 argument(s)
Replies: 3
Views: 3928

Hi Peter, I think, the compiler's behavior is not inconsistent there. The manual teaches: This piece of code illustrates how to create an integer queue and insert an element in it: ..., Q = queueClass{integer}::new(), Q:insert(17), ... It is not necessary to apply the type explicitly, instead the co...
by Martin Meyer
10 Jun 2015 11:42
Forum: Visual Prolog
Topic: How to switch off a compiler warning
Replies: 3
Views: 4277

Hello Peter, I just tested it and was able to switch off the warning: In current VIP 7.5.0.1 I created a new project of kind "console application" and put following code to main.pro implement main class predicates test : (string) procedure anyflow. clauses test(S) :- stdIo::write(S). claus...
by Martin Meyer
9 Jun 2015 18:36
Forum: Visual Prolog
Topic: Problem with Scope Type Parameter
Replies: 5
Views: 4479

Thanx Thomas for the info!

I was filing my answer to Peter before I've seen your message.

Best regards
Martin
by Martin Meyer
9 Jun 2015 18:27
Forum: Visual Prolog
Topic: Problem with Scope Type Parameter
Replies: 5
Views: 4479

Hi Peter, I also have not understood why the compiler should complain on that construct, and I suspect compiler's complain is incorrect. I suppose, the compiler fails to see the usage of @Type , because the usage is indirect via domain type in myDomain{@Type} . And that's the relevant issue. That th...
by Martin Meyer
9 Jun 2015 9:53
Forum: Visual Prolog
Topic: Problem with Scope Type Parameter
Replies: 5
Views: 4479

Problem with Scope Type Parameter

Hello Thomas, using the Support pattern I came across a problem. Please have a look at my construct. I start demonstrating the issue from the following code, which works out fine: interface myDomain{@Type} domains type = @Type. end interface myDomain %====== interface obj{@Type} open myDomain{@Type}...
by Martin Meyer
5 Jun 2015 10:58
Forum: Visual Prolog
Topic: Deterministic Error
Replies: 7
Views: 6290

When you -only- replace your retract statement by text1(Title) the error persists, because text1(Title) can have none, one, or many solutions since fact text1 is still nondeterm. Followed by a cut, i.e. text1(Title), ! , it gives either none or one solution. Thus both ways, with or without cut, don'...