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
1- The section qualifier "class" is not allowed here
2-The section "facts" is not allowed here