Search found 695 matches

by Steve Lympany
1 Nov 2011 11:06
Forum: Visual Prolog
Topic: How to convert from list to be different name
Replies: 21
Views: 4300

Hi, 1) can you explain the different between "class facts" and "facts"? See http://wiki.visual-prolog.com/index.php?title=Introduction_to_Classes_and_Objects Class facts and class predicates (=methods) have only one copy in your program (equivalent to modular programming). Object facts and predicate...
by Steve Lympany
26 Oct 2011 14:33
Forum: Visual Prolog
Topic: how to colorize the background of "controlStaticText"
Replies: 9
Views: 2467

Hi, 1) See http://discuss.visual-prolog.com/viewtopic.php?t=7329 2) I don't know what your application will be, but it is probably not a good idea to override the end-users' Windows colour settings (that they prefer). Generally, it is best to use the default settings, except in special circumstances...
by Steve Lympany
24 Oct 2011 15:37
Forum: Visual Prolog
Topic: HOW CAN I CACULATE THE SUM OF HUGE LIST OF REALS WITHOUT STACK OVERFLOW .
Replies: 13
Views: 3225

Hi,
I keep forgetting to use varM!!
:oops:
cheers
Steve
by Steve Lympany
24 Oct 2011 8:02
Forum: Visual Prolog
Topic: [ASK] Expert System
Replies: 1
Views: 1568

Hi, I think that is a question that requires a very big answer. Visual Prolog would be a good language to use for your problem, but you need to ask specific questions about the language. I think you can find examples of expert systems in Visual Prolog that you can learn from. See http://wiki.visual-...
by Steve Lympany
24 Oct 2011 7:57
Forum: Visual Prolog
Topic: is it possible to keep the last file selected in dialog box "vpiCommonDialogs::getFileName"
Replies: 2
Views: 1073

Hi,

Code: Select all

facts    zz_last_file:string. clauses     test():-        zz_last_file:=vpiCommonDialogs::getfilename(zz_last_file,.....).
regards
Steve
by Steve Lympany
23 Oct 2011 7:42
Forum: Visual Prolog
Topic: HOW CAN I CACULATE THE SUM OF HUGE LIST OF REALS WITHOUT STACK OVERFLOW .
Replies: 13
Views: 3225

Hi, Please let me interrupt... :-) I don't understand why you get a stack overflow with your code. Your code is correct. How many numbers are you adding? Maybe it is the list itself causing the problem, and not the summing. But I have made a list of 10^6 reals with no problem. Anyway, the following ...
by Steve Lympany
21 Oct 2011 6:47
Forum: Visual Prolog
Topic: how can i save contents of messages window to a file with name of Username from login form
Replies: 20
Views: 4281

Hi, Repeating what Paul has said, use this code: predicates login : (string Nama) procedure(i). %NO (o). It is always called with a known Nama %REPEAT - you must remove the (o) clauses login(Nama) :- ""=string::isWhiteSpace(Nama),!, vpiCommonDialogs::note("you must supply a non-blank name"). login(N...
by Steve Lympany
20 Oct 2011 16:40
Forum: Visual Prolog
Topic: How can I change the line color when I draw a rectangle ?
Replies: 3
Views: 1111

Hi,
Use setpen() (GDI or VPI). Also setBrush. eg

Code: Select all

draw(GDI):- GDI:setpen(1,ps_solid,color_white),
regards
Steve
by Steve Lympany
18 Oct 2011 20:04
Forum: Visual Prolog
Topic: Stopping a thread
Replies: 2
Views: 1146

Hi Thomas,
Thanks - I will try it out.
cheers
Steve
by Steve Lympany
18 Oct 2011 16:23
Forum: Visual Prolog
Topic: how can i save contents of messages window to a file with name of Username from login form
Replies: 20
Views: 4281

Hi,
The unbound variable will produce the (o). It needs to be bound. Only your second variable is bound.
regards
Steve
by Steve Lympany
18 Oct 2011 14:57
Forum: Visual Prolog
Topic: Domain Declaration with different type..??
Replies: 9
Views: 1722

Hi, Yes - the clue is in the error message :wink:. You are calling it with an integer and not mytype. So divByZero(5,6) should be: divByZero(i(5),i(6)) divByZero(r(5.2),r(6.7)) I am not sure what you are doing dividing strings :?: divByZero(_X, i(0)):- vpiCommonDialogs::note("div by zero exception")...
by Steve Lympany
18 Oct 2011 13:27
Forum: Visual Prolog
Topic: Table Editor Package vpiTableed
Replies: 8
Views: 2018

Hi,
It haven't used 7.3's tableed.

But I have uploaded this executable example, as promised:

www.acsumama.com/lyszt.zip

..which I need to get around to making available one day, but there hasn't been much interest. But that isn't much help to you right now! Sorry.

cheers
Steve
by Steve Lympany
18 Oct 2011 12:46
Forum: Visual Prolog
Topic: Domain Declaration with different type..??
Replies: 9
Views: 1722

Code: Select all

domains     myType = integer;real ; string.  %Does it possible to declare domain like this  ???
Hi,
No. You would have to do this:

Code: Select all

domains     myType = i(integer);r(real); s(string).
regards
Steve
by Steve Lympany
17 Oct 2011 8:43
Forum: Visual Prolog
Topic: How to get a data from text file
Replies: 17
Views: 4252