Discussions related to Visual Prolog
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

in_test and in_iterate attributes

Unread post by Martin Meyer »

Hello Thomas,

I am upgrading my projects to VIP 9. The new ways to pass arguments are greatly simplifying my code!

You could relax the predicate types used in in_test and in_iterate attributes to allow also for predicates having additional optional arguments.
Regards Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: in_test and in_iterate attributes

Unread post by Thomas Linder Puls »

I am glad you like it.

In principle we could relax the requirements to in_test and in_iterate, but I don't think the benefit will match the necessary effort. And in any case it would not be effective until the next major release.

I suggest that you introduce dummy predicates for in_test and in_iterate, where nedessary:

Code: Select all

interface someThing     [in_test(in_test)]   predicates     isIn : (integer X, string Msg = "") determ.   predicates     in_test : (integer X) determ. % dummy without optional argument   end interface something   implement someThing clauses     in_test(X) = isIn(X).     clauses    isIn(X, Msg) :- ...
The in_test predicate is of course a noisy (otherwise) unnecessary predicate.
Regards Thomas Linder Puls
PDC
Post Reply