Search found 45 matches

by B.Hooijenga
19 May 2020 9:00
Forum: Visual Prolog
Topic: troubles installing build vip905ce.msi
Replies: 3
Views: 2145

Re: troubles installing build vip905ce.msi

Hallo Harrison and Thomas, Combining your replies I uninstalled vip 9.0.4 ( using the normal windows-uninstaller). So, I had a computer without a vip9 installation. That feels a little strange. But after that, installing build 9.0.5 succeeded. :D Lesson learned: keep a new build in the same director...
by B.Hooijenga
18 May 2020 12:07
Forum: Visual Prolog
Topic: troubles installing build vip905ce.msi
Replies: 3
Views: 2145

troubles installing build vip905ce.msi

Hello Thomas, I am having troubles with installing build 905 After downloading and calling vip905ce.msi I get this message from the Windows Installer: (I translated the dutch text) There is already another version of this program installed. You can not proceed with the installation of this version. ...
by B.Hooijenga
16 Apr 2020 12:53
Forum: Visual Prolog
Topic: strange result in array2M
Replies: 2
Views: 2959

Re: strange result in array2M

Thank you Thomas,

All is working well,

But: list::getMemberIndex_nd() does not exist in my helpfile too.

Kind regards
Ben
by B.Hooijenga
16 Apr 2020 10:00
Forum: Visual Prolog
Topic: strange result in array2M
Replies: 2
Views: 2959

strange result in array2M

Hello, I try to initialize an array2M, but get a strange result. Am I doiing something wrong? class facts - matrixDB linsys : array2M{real} := erroneous. sizeX : positive := erroneous. % 4 colums sizeY : positive := erroneous. % 3 rows class facts v : (real*). clauses v([2, 1, -1, 8]). v([-3, -1, 2,...
by B.Hooijenga
23 Oct 2019 13:21
Forum: Visual Prolog
Topic: Reading hexadecimal from utf8 files
Replies: 9
Views: 5011

Re: Reading hexadecimal from utf8 files

Loffy

For classical bytes you need unsigned8 as domain.

To pick up the unsigned8 values from the binary you could use the predicate:
binary::getIndexed_unsigned8/2->

Using a hexadecimal notation for unsigned8 values is possible.
for instance
X = 0xFF.

Kind regards

Ben
by B.Hooijenga
17 Oct 2019 13:59
Forum: Visual Prolog
Topic: Progress Bar status indicator
Replies: 37
Views: 13810

Re: Progress Bar status indicator

hello Loffy,

please try: vpi::processEvents immediate after write command
like:

Code: Select all

        msg:write("Busy with backup ...\n"),         _ = vpi::processEvents(),         ...         rest of code
I had no troubles so far.

regards
Ben
by B.Hooijenga
14 Sep 2019 8:48
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 3818

Re: convert unsigned 64

Tick = time::getTickCount(), %unsigned64
bit::getUnsigned64bytes(Tick, Low, _High),
stdio::write(Low, "\n").

Kind regards
Ben
by B.Hooijenga
5 Sep 2019 14:14
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 3965

Re: integer or string to binary

Loffy, The type unsigned uses 32 bits and an unsigned8 uses 8 bits Both types are just a sequence of bits. There is no principal difference. Visual Prolog uses the bitsize to define them. Visual Prolog has a class for bit-operations. The class uses unsigned. But I think you can use them for whatever...
by B.Hooijenga
3 Sep 2019 15:45
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 3965

Re: integer or string to binary

Hello Loffy, Strings in Visual Prolog use unicode. These strings must be converted to unsigned8. Here is an example. I use it for communicating with a robot. Binary = unicodestring_to_bin("hallo "), stdio::write(Binary). predicates unicodestring_to_bin : (string) -> binary. clauses unicodestring_to_...
by B.Hooijenga
26 Aug 2019 11:44
Forum: Visual Prolog
Topic: Convert integer to hexadecimal
Replies: 4
Views: 3379

Re: Convert integer to hexadecimal

Hello Lofty Here are two possibilities. Use the helpfile for information about class binary. predicates testing : (). clauses testing() :- % For manipulating bytes (in hexadecimal form) you need class binary Binary1 = binary::createAtomic(1), binary::setIndexed_unsigned8(Binary1, 0, 255), stdio::wri...
by B.Hooijenga
1 May 2019 10:00
Forum: Visual Prolog
Topic: onKeyDown and window::defaultKeyDownHandling
Replies: 6
Views: 3320

Re: onKeyDown and window::defaultKeyDownHandling

Hello Dave,

I had the same problem.
I found this solution: I made a customControl in an formwindow.
In this customControl you can make an KeyDownResponder.
The customControl must have focus.
And then the KeydownResponder will work perfectly.

Ben
by B.Hooijenga
30 May 2018 10:08
Forum: Visual Prolog
Topic: logging
Replies: 2
Views: 6301

Re: logging

Thank you Thomas,

I will study it further.

Kind regards

Ben
by B.Hooijenga
28 May 2018 12:38
Forum: Visual Prolog
Topic: logging
Replies: 2
Views: 6301

logging

Hello, I am trying to use the log/package. In the logdemo program there is the following xml file. <LogConfigurations> <LogConfig name="ConfigName0"> <Appenders> </Appenders> </LogConfig> <LogConfig name="ConfigNameMC"> <Appenders> <Appender name="AppenderName2"> <LogLevel>all</LogLevel> <Type>filea...
by B.Hooijenga
5 Sep 2016 11:55
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 6874

Thomas Because I am using a timerevent in my robotprogram I was a little bit confused about the delaycall. This is the solution I eventually use. The trick is to stop the timer in case of an systemerror. It seems to work well. I did not see the term unknownexception anymore by driving the robot. fac...
by B.Hooijenga
29 Aug 2016 13:19
Forum: Visual Prolog
Topic: closing the program after an unknown exception?
Replies: 11
Views: 6874

Thomas, I tried your suggestion, again with forcing an unknown exception with 400 milliseconds time duration instead of 700. But no result: it does not work: my program hangs, the robot goes wild and bluetooth is not happy either. No harm done. Then I tried this: predicates onShow : window::showList...