| Visual Prolog |
Article Index for Visual |
Website Links For Visual |
Information AboutVisual Prolog |
|
Visual Prolog is compiled rather than interpreted, as is traditional for logic languagues. The core of Visual Prolog are Horn Clause s like in Prolog, but unlike Prolog, Visual Prolog has always been Strongly And Statically Typed . Since version 6.0 the language has been fully Object-oriented . Hanoi Example class hanoi predicates hanoi : (unsigned N). end class hanoi implement hanoi domains pole = string. clauses hanoi(N) :- move(N, "left", "centre", "right"). class predicates move : (unsigned N, pole A, pole B, pole C). clauses move(0, _, _, _) :- !. move(N, A, B, C) :- move(N-1, A, C, B), stdio::writef("move a disc from % pole to the % pole ", A, B), move(N-1, C, B, A). end implement hanoi goal console::init(), hanoi::hanoi(4). SEE ALSO EXTERNAL LINKS |
|
|