in_test and in_iterate attributes

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

in_test and in_iterate attributes

Unread post by Martin Meyer » 13 Mar 2019 1:19

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: 1668
Joined: 28 Feb 2000 0:01

Re: in_test and in_iterate attributes

Unread post by Thomas Linder Puls » 13 Mar 2019 11:15

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

Post Reply