Search found 11 matches

by hadiranji
23 Feb 2014 18:16
Forum: Visual Prolog
Topic: error c504
Replies: 2
Views: 1250

error c504

hi i write a program for finding path but received error message please help me ? predicates findPath : (string Start, string End) -> string* Path determ. clauses findPath(Start, End) = list::reverse(findPath2(Start, End, [Start])).<<<<<error predicates findPath2 : (string Start, string End, string*...
by hadiranji
22 Feb 2014 8:47
Forum: Visual Prolog
Topic: stackoverFlow Error for some Shortest Path
Replies: 7
Views: 2435

i change my program but i received error : Network.pro(47,38) error c504: The expression has type '::string', which is incompatible with the type '::string*' Network.pro(49,34) error c504: The expression has type 'a$*', which is incompatible with the type '::string' i attached network.pro and networ...
by hadiranji
21 Feb 2014 21:01
Forum: Visual Prolog
Topic: stackoverFlow Error for some Shortest Path
Replies: 7
Views: 2435

i think my problem is endless loop
but for resolve it how can store visited node in list and preventing to visit it again ?
by hadiranji
21 Feb 2014 12:53
Forum: Visual Prolog
Topic: stackoverFlow Error for some Shortest Path
Replies: 7
Views: 2435

stackoverFlow Error for some Shortest Path

hi i write a simple program to show the path in node it's working for node who is direct connected but i have Error when it's connected by another node connected(Window,X,Z):-edge(X,Z,L),L>"0", nVal:=nVal+toterm(L), stdio::write(X, " to ",Z," by weight ", L," all ",nVal,"\n"),!. connected(Window,X,Z...
by hadiranji
29 Jan 2014 21:16
Forum: Visual Prolog
Topic: use object in class
Replies: 0
Views: 1785

use object in class

hi i write a program to calculate path between edges but i can't return value to editbox and only i write in command windows ! how can do it ? connected(Window,X,Z):-edge(X,Z,L),L>"0", draw(Window,X,Z),nVal:=nVal+toterm(L), stdio::write(X, " to ",Z," by weight ", L," all ",nVal,"\n"),!. connected(Wi...
by hadiranji
29 Jan 2014 21:09
Forum: Visual Prolog
Topic: DrawLine Color
Replies: 1
Views: 1063

DrawLine Color

hi
how can draw line with specified color ?
by hadiranji
29 Jan 2014 21:02
Forum: Visual Prolog
Topic: shortest path
Replies: 1
Views: 1033

shortest path

hi i writing the program who find path in edges but for preventing : e631: The predicate 'factorial::fac/2 (i,o), which is declared as 'procedure', is actually 'multi' i used "!" sign is returned only one path but i need to return all path and then use shortest path how can do it ? connected(Window,...
by hadiranji
15 Jan 2014 19:24
Forum: Visual Prolog
Topic: define clause with value from edit control
Replies: 6
Views: 1834

assert command is work but only once
when the fact is defined by assert command i can't change value of fact !

and assert definition is different by define rule in class predicates and some time i received "Stack ower flow" error
by hadiranji
14 Jan 2014 10:43
Forum: Visual Prolog
Topic: define clause with value from edit control
Replies: 6
Views: 1834

define clause with value from edit control

hi i am new in visual prolog and need to define clause with value from edit control but i received error : "The object member 'edit_ctl' is used in the class predicate" how can do it ? please help me class facts edge:(string,string,string). clauses classInfo(className, classVersion). edge("A","B",ed...
by hadiranji
17 Dec 2013 9:30
Forum: Visual Prolog
Topic: using object in class predicate
Replies: 1
Views: 1012

using object in class predicate

hi i need to define clause with value from edit control but i received error : "The object member 'edit_ctl' is used in the class predicate" how can do it ? class facts edge:(string,string,string). clauses classInfo(className, classVersion). edge("A","B",edit_ctl:getText()). edge("A","C",edit1_ctl:g...
by hadiranji
7 Dec 2013 15:26
Forum: Visual Prolog
Topic: Family tree simple project
Replies: 2
Views: 2821

Family tree simple project

hi i am new in visual prolog and i read some book about it but i can't define fact and rule in visual prolog this is my program : %fact parent( pam, bob). parent( bob, liz). %rule grandparent(X,Z):-parent( X, Y),parent( Y, Z). %goal edit3_ctl:setText=grandparent( edit1_ctl:getText(), edit2_ctl:getTe...