Declaring predicates containing elipse

Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 92
Joined: 18 Jul 2006 17:18

Declaring predicates containing elipse

Unread post by daveplummermd » 4 Jan 2020 14:51

How do I declare the predicates supporting the following?

Code: Select all

clauses ppp(...) :- W = { () :- stdio::write(...) }, qqq(W).
I am working through the examples included in the document "Language Reference/Terms", under the heading "Capturing ellipsis (...)". The above code is included to illustrate, and I am including it in a program so that I can use debug to follow and learn.

I am declaring ppp:

Code: Select all

predicates     ppp : (...).
How do I declare qqq ?

Thanks in advance
Dave Plummer

User avatar
Thomas Linder Puls
VIP Member
Posts: 1643
Joined: 28 Feb 2000 0:01

Re: Declaring predicates containing elipse

Unread post by Thomas Linder Puls » 4 Jan 2020 16:22

The predicate takes a predicate without arguments (e. g. a runnable) as argument

Code: Select all

predicates     qqq : (core::runnable Action).
Regards Thomas Linder Puls
PDC

daveplummermd
VIP Member
Posts: 92
Joined: 18 Jul 2006 17:18

Re: Declaring predicates containing elipse

Unread post by daveplummermd » 4 Jan 2020 17:40

Thanks you.
Dave Plummer

Post Reply