Search found 333 matches

by Harrison Pratt
3 Jun 2020 2:35
Forum: Visual Prolog
Topic: Visual Prolog Speed
Replies: 11
Views: 797

Re: Visual Prolog Speed

You are infinitely more expert in Ring than I am.
by Harrison Pratt
2 Jun 2020 14:10
Forum: Visual Prolog
Topic: Visual Prolog Speed
Replies: 11
Views: 797

Re: Visual Prolog Speed

class predicates demo : (). clauses demo() :- % create matrix Rows = 100, Cols = 100, Matrix2D = array2M::newInitialize(Rows, Cols, 0), % insert some values Matrix2D:set(0, 0, 11), Matrix2D:set(0, 1, 22), % retrieve some values ValueA = Matrix2D:get(0, 0), ValueB = Matrix2D:get(0, 1), % how big? Si...
by Harrison Pratt
2 Jun 2020 12:27
Forum: Visual Prolog
Topic: Visual Prolog Speed
Replies: 11
Views: 797

Re: Visual Prolog Speed

Hi Gal,
I don't understand what you mean by "I can not write the code."
Were you able to look at the Game of Life (GOL) code?
Do you need a very simple example of using a 2D matrix?
by Harrison Pratt
1 Jun 2020 12:05
Forum: Visual Prolog
Topic: Visual Prolog Speed
Replies: 11
Views: 797

Re: Visual Prolog Speed

The "Game of Life" I posted in Visual Prolog Tips & Samples uses a 2D matrix.

http://discuss.visual-prolog.com/viewto ... 52674c8555
by Harrison Pratt
25 May 2020 18:01
Forum: Visual Prolog
Topic: VIP 802 Find in Files stopped working
Replies: 4
Views: 2418

Re: VIP 802 Find in Files stopped working

This problem recurred today. I closed the IDE and deleted the <project>.env file using Windows File Explorer and the problem went away.

Restarting the computer does not help.
by Harrison Pratt
25 May 2020 13:16
Forum: Visual Prolog Tips & Samples
Topic: Conway's Game of Life - GDI+
Replies: 0
Views: 518

Conway's Game of Life - GDI+

George Conway's Game of Life for VPI 9.05 using GDI+ graphics.

You can find it here: https://github.com/hwpratt/VisualProlog ... moProjects

Download the .zip file and compile the project. No .exe or .dll files are included.
by Harrison Pratt
25 May 2020 11:20
Forum: Visual Prolog
Topic: Domains specification in both .i and .cl files
Replies: 3
Views: 700

Re: Domains specification in both .i and .cl files

Thanks, Martin! Putting the domain declaration in the .i file works OK today , but that produced the error messages I posted above. I was testing in a minimal VIP 905 console app to sort out the same error that I was getting in another project ... very strange. Thanks again, Harrison Addendum: The p...
by Harrison Pratt
24 May 2020 16:37
Forum: Visual Prolog
Topic: Domains specification in both .i and .cl files
Replies: 3
Views: 700

Domains specification in both .i and .cl files

Is there a way to expose a user-defined domain in both the .i and .cl files of a class that doesn't require using an additional 'helper' class ( faceHelper.cl in the example below)? I get error e205 Unknown domain/interface 'expressionDOM' in pack 'main.pack' face.i if I define the domain only in th...
by Harrison Pratt
18 May 2020 12:34
Forum: Visual Prolog
Topic: troubles installing build vip905ce.msi
Replies: 3
Views: 955

Re: troubles installing build vip905ce.msi

I have also old versions 7 and 8 installed. But that was never a problem. I always used to install new builds "on top" of the existing version that is: in the same directory. Never had troubles. Last time however I installed vip904ce.msi in another directory (can't remember why I did that). No trou...
by Harrison Pratt
18 May 2020 12:26
Forum: Visual Prolog
Topic: VP7.4 to VP9 Application
Replies: 4
Views: 1056

Re: VP7.4 to VP9 Application

the Editor and ChainDb were removed from VP9.
Yes, that is my understanding. I do recall that SQL databases were recommended for heavy-duty applications. You might post a separate question about that question.
by Harrison Pratt
18 May 2020 12:22
Forum: Visual Prolog
Topic: To show a message with MessageBox
Replies: 1
Views: 861

Re: To show a message with MessageBox

The return value is the button number (1...N) you clicked. You may use it to control subsequent program flow: ButtonNumClicked = vpiCommonDialogs::messageBox("Message Title", "This is a Message", vpiDomains::mesbox_iconError, vpiDomains::mesbox_buttonsokcancel, vpiDomains::mesbox_defaultfirst, vpiDo...
by Harrison Pratt
17 May 2020 13:17
Forum: Visual Prolog
Topic: e150 Syntax error vpiCommonDialogs::note
Replies: 2
Views: 884

Re: e150 Syntax error vpiCommonDialogs::note

clauses
onMensajesNota1(_Source, _MenuTag) :- % <== you had '.' here instead of ":-"
vpiCommonDialogs::note("Esto es un Mensaje").
by Harrison Pratt
16 May 2020 22:25
Forum: Visual Prolog
Topic: VP7.4 to VP9 Application
Replies: 4
Views: 1056

Re: VP7.4 to VP9 Application

Mike, You are almost there ... your VP7.4 file is ANSI encoded and VP9 needs UTF-8 . If you open the file in Notepad you will see Notepad has is a File | Save As... option. At the bottom of the Save As dialog there is an option for you to select Encoding: . Save the file as UTF-8 and it will be read...
by Harrison Pratt
14 May 2020 17:46
Forum: Visual Prolog
Topic: OR Logical Operator
Replies: 2
Views: 997

Re: OR Logical Operator

Parentheses are your friends!

Code: Select all

    cause("Success", CFI, CFO) :-         (xpositive2(_, 1, 9) or xpositive2(_, 4, 11)),         CFO = CFI + 0.05,         !.
Also, if you use ";" as a substitute for "or" the IDE will politely change ";" to "or" to use the more visually obvious form! :-)
by Harrison Pratt
21 Apr 2020 17:15
Forum: Visual Prolog Tips & Samples
Topic: ACM Digital Library is open and free until June 30, 2020
Replies: 0
Views: 1915

ACM Digital Library is open and free until June 30, 2020

This is a good time to download some of those classic texts you have always wanted.

https://dl.acm.org/