Wiki Visual Prolog Tutorial- Error message

Discussions related to Visual Prolog
Frank
Posts: 22
Joined: 23 Nov 2014 20:41

Wiki Visual Prolog Tutorial- Error message

Unread post by Frank » 1 Feb 2015 17:31

At the end of an excellent step-by-step Fundamental Visual Prolog GUI tutorial, there is an instruction how to make tryGetName predicate global by adding certain codes to ancestorDialog.cl. After addition, of the suggested lines the codes looks like:

Code: Select all

class ancestorDialog : ancestorDialog     open core, vpiDomains   % Code added by me copied from Fundamental Visual prolog Tutorial for family example domains     optionalString = none(); one(string Value). class facts     name : optionalString := none().   clauses     tryGetName(Parent) = Name :-         name := none(),         _ = ancestorDialog::display(Parent),         one(Name) = name.   %end of the code added  by me   predicates     display : (window Parent) -> ancestorDialog AncestorDialog.   constructors     new : (window Parent).     end class ancestorDialog
Unfotunatelly when I Build the code, the cursor points to "class facts" and gives following errors:

1- The section qualifier "class" is not allowed here
2-The section "facts" is not allowed here

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

Unread post by Thomas Linder Puls » 1 Feb 2015 18:14

It is correct that the declaration must go into ancestorDialog.cl, but the rest of the code have to go into ancestorDialog.pro.
Regards Thomas Linder Puls
PDC

Post Reply