Built-in classes

Discussions related to Visual Prolog
David Harris
Posts: 15
Joined: 14 Jun 2012 7:47

Built-in classes

Unread post by David Harris » 19 Jun 2012 4:00

Where can I find listings of the clauses in the built-in classes (stdIO, list etc)?
Delta the Cat

Martin Meyer
VIP Member
Posts: 294
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer » 20 Jun 2012 12:04

Hi David,

the classes stdIO, list etc. are not built-in into the compiler. They are part of the Prolog Foundation Classes (PFC).

You find listings of the clauses in the *.pro files in the subdirectories of directory pfc, which comes with the installation of Visual Prolog.

Regards,
Martin

David Harris
Posts: 15
Joined: 14 Jun 2012 7:47

Built-in classes

Unread post by David Harris » 3 Jul 2012 2:33

Thanks Martin. :-)
Delta the Cat

David Harris
Posts: 15
Joined: 14 Jun 2012 7:47

Built-in classes

Unread post by David Harris » 3 Jul 2012 2:51

Sorry, Martin, still confused!

In the pfc folder are many useful things, but I still have two problems:
- I couldn't find stdio, or some other things I have used in the teaching information.
- What I guess I am really looking for is a user-friendly list of available predicates, with explanations of what they do. For example, there is a lot available in the file time.pro, but it is not so easy to work out exactly how to use them just from the code.

Is there such a user list?
Delta the Cat

dominique f pannier
VIP Member
Posts: 98
Joined: 23 Sep 2002 23:01

Unread post by dominique f pannier » 3 Jul 2012 8:22

Hi David
What I guess I am really looking for is a user-friendly list of available predicates, with explanations of what they do
When you have compiled your project, and are looking for informations about stdIO predicates, for example, you can use the built-in help with shotcuts.
At the line of code wher you wrote, for example :

Code: Select all

stdIO::writef("%\n", Something),
dbl clic on the predicate writef, then with ctrl+shift+D (like Definition) you open a window which ask you to resolve ambiguity on this predicate. Yous select

Code: Select all

stdio::writef : (string Format)
and then you access to the stdIO cl class which list the whole predicates of the class with its explanations.
If you need to look at the predicate itself, to see how it works, use ctrl+shift+C (like Construction) and you acess after resolving ambiguity to the stdIO pro class.
You can chain theses actions, and therefore enter into the complexity of the whole built-in code.
Regards
Dominique Pannier

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

Unread post by Thomas Linder Puls » 3 Jul 2012 9:06

There are more than 1000 classes/interfaces in PFC. And who knows how many domains, constants, predicates and properties. They are all listed in the help system. But we have not found it possible to create a user-friendly list of them all. I would simply not know how to make such a long list user friendly.

Instead we have made some tutorials to help you get started and to cover specific areas of interest.

We have also included a larger number of examples illustrating various topics (in the IDE: Help -> Install Examples...).

And finally and very important we have created a lot of facilities in the IDE to assist you:
  • The IntelliSpeed faililty will provide lists of possibilities as you type.
  • IDE: Go to -> Source Browser... (Ctrl+B) gives you the possiblilty to search for entities
  • IDE: In the project tree you can find all classes/interfaces/implementation and their member entities.
  • IDE: Go to -> Go to Declaration... (Ctrl+F12) will bring you to the declaration of something that is already typed.
Most of the IDE facilities requires that the project is compiled to work optimally.
Regards Thomas Linder Puls
PDC

Post Reply