Search found 34 matches

by Elena Efimova
22 May 2014 22:13
Forum: Visual Prolog
Topic: Create User Control
Replies: 16
Views: 4811

Re:

Hello! This code does not work in Visual Prolog 7.4: predicates onButtonMouseDown : window::mouseDownListener. clauses onButtonMouseDown(_Source, Point, ShiftControlAlt, Button) :- stdio::writef("Point = %, ShiftControlAlt = %, Button = %\n", Point, ShiftControlAlt, Button). But getFocusListener wor...
by Elena Efimova
11 Jan 2013 12:34
Forum: Visual Prolog
Topic: Problem with radixTree in Visual Prolog 7.4
Replies: 2
Views: 1354

Thank you, Thomas. It works.
The algorithm is correct. :-)
About Build -> Run in Window. I offen use it, but the console window is not "clean" in this case. There are extra lines in it. Sometimes it would be better without them.
by Elena Efimova
11 Jan 2013 9:56
Forum: Visual Prolog
Topic: Problem with radixTree in Visual Prolog 7.4
Replies: 2
Views: 1354

Problem with radixTree in Visual Prolog 7.4

Hello! This program works in Visual Prolog 7.3 but does not work in Visual Prolog 7.4: class facts tr : dictionary{dictionary{unsigned}} := empty. class predicates tryGet : (unsigned, unsigned) -> unsigned determ. setVal : (unsigned, unsigned, unsigned). clauses tryGet(X, Y) = lookup(lookup(tr, X), ...
by Elena Efimova
13 Dec 2012 16:02
Forum: Visual Prolog
Topic: Problem with commentaries in Visual Prolog 7.4
Replies: 3
Views: 1143

Thomas, I tested a small program (console application) many times for different sets of facts, "commenting" some of them. class facts p : (string, ... ...). clauses % p(..., ... ...). % p(..., ... ...). p(..., ... ...). p(..., ... ...). % 30-40 facts or clauses p(..., ... ...). % p(..., ... ...). p(...
by Elena Efimova
13 Dec 2012 13:01
Forum: Visual Prolog
Topic: Problem with commentaries in Visual Prolog 7.4
Replies: 3
Views: 1143

Problem with commentaries in Visual Prolog 7.4

Hello! When I mark the commentaries using %, after a couple or three runs or even at once, the entire page of code below that mark turns gray. The program works fine. After this, I replace the % by /* */ - everything is normal. But after the program a couple of times runs, again all is gray and it i...
by Elena Efimova
2 Dec 2012 19:45
Forum: Visual Prolog
Topic: Problem with console::setLocation in vip 7.4
Replies: 4
Views: 2795

Thank you! The problem has been solved. :-)
by Elena Efimova
30 Nov 2012 5:59
Forum: Visual Prolog
Topic: Problem with console::setLocation in vip 7.4
Replies: 4
Views: 2795

Problem with console::setLocation in vip 7.4

Hello!

It does not work (32 bit).
by Elena Efimova
20 Jan 2011 20:51
Forum: Visual Prolog
Topic: Different classes with same interface
Replies: 3
Views: 1136

I've understood how to do it. Everything is ok. Thanks again. :-)
by Elena Efimova
20 Jan 2011 20:35
Forum: Visual Prolog
Topic: Different classes with same interface
Replies: 3
Views: 1136

Thanks, Thomas.
But how to create several classes with one interface?
Could you give a small example, please?
by Elena Efimova
20 Jan 2011 17:29
Forum: Visual Prolog
Topic: Different classes with same interface
Replies: 3
Views: 1136

By the way, Thomas, recently it was possible to create different classes with the same interface. interface a ... class b : a ... class c : a ... Is it possible to do it now? Or should I do as follows: interface a ... class a : a ... interface b supports a end interface class b : b ... ?
by Elena Efimova
20 Jan 2011 15:37
Forum: Visual Prolog
Topic: problem with facts and variables
Replies: 2
Views: 1092

:-)
by Elena Efimova
19 Jan 2011 17:20
Forum: Visual Prolog
Topic: problem with facts and variables
Replies: 2
Views: 1092

problem with facts and variables

Hello! Suddenly, I have found the following: class facts s: (string, string). n: (integer, integer). clauses run():- console::init(), X = std::fromTo(1, 3), not(s(Y, toString(X))), assert(s(Y, toString(X))), fail; K = std::fromTo(1, 3), not(n(N, K)), assert(n(N, K)), fail; s(P, Q), writef("% - %\n",...
by Elena Efimova
3 Jan 2011 10:35
Forum: Visual Prolog
Topic: Something wrong with mod
Replies: 2
Views: 1396

Thanks, Thomas. :-)
by Elena Efimova
3 Jan 2011 8:53
Forum: Visual Prolog
Topic: Something wrong with mod
Replies: 2
Views: 1396

Something wrong with mod

Hello! Operation mod works in a strange way. Let f be defined in a following way: class predicates f : (unsigned) -> unsigned. clauses f(N) = N:- N mod 2 = 0, !. f(_) = 0. run():- console::init(), write([f(I) || I = std::fromTo(1, 5)]), nl, write([J mod 2 || J = std::fromTo(1, 5)]), nl, _ = readLine...
by Elena Efimova
14 Apr 2010 13:53
Forum: Visual Prolog
Topic: problem with unary minus
Replies: 14
Views: 2937