Search found 319 matches

by Harrison Pratt
2 Jun 2020 12:27
Forum: Visual Prolog
Topic: Visual Prolog Speed
Replies: 11
Views: 2213

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: 2213

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: 6
Views: 3596

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: 1137

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: 1660

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: 1660

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: 1856

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: 2091

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: 1713

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: 1783

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: 2091

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: 1925

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: 2325

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/
by Harrison Pratt
18 Apr 2020 22:33
Forum: Visual Prolog
Topic: VIP 904 project browser fact section display - request
Replies: 0
Views: 3187

VIP 904 project browser fact section display - request

In some future upgrade could the ability to identify and jump to named fact sections as was done in VIP 8x be added to 9x? Currently all class and object facts sections are lumped together. In some of my more complex .PRO files I have several object fact sections which correspond with various interf...
by Harrison Pratt
17 Apr 2020 17:49
Forum: Visual Prolog
Topic: VIP 904 Class Creation may be incompletely registered in.ph file
Replies: 1
Views: 2751

VIP 904 Class Creation may be incompletely registered in.ph file

Scenaro: Create a new console project Create a new class 'test01' with interface in the project directory (main.ph & main.pack) Build the project and get Errors: Type Action Description Filename Path e218 Unknown interface 'test01' in pack 'main.pack' test01.cl The new class interface is not added t...