Search found 34 matches

by Loffy
13 Sep 2019 9:26
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 455

convert unsigned 64

I know I am missing something simple, but I am having trouble converting an unsigned64 value to an integer.

Any Ideas.

Loffy
by Loffy
8 Sep 2019 5:09
Forum: Visual Prolog
Topic: unsigned8 bit operations
Replies: 3
Views: 474

Re: unsigned8 bit operations

Martin,

Thanks.

Loffy
by Loffy
7 Sep 2019 13:48
Forum: Visual Prolog
Topic: unsigned8 bit operations
Replies: 3
Views: 474

unsigned8 bit operations

I perform a ByteOut = bit::bitXor(Byte1, Byte2) operation where both Byte1 and Byte2 are defined as unsigned8. The resulting ByteOut value is an unsigned32 value. Is there a better way to make ByteOut an unsigned8 other than using bit::setHigh / setLow predicates to convert between unsigned32 and un...
by Loffy
5 Sep 2019 13:27
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 626

Re: integer or string to binary

Thomas, Thanks for your reply. I am an oldish dog, and I am learning new tricks every day, though sometimes slower than a new dog would. My problem resolved around two points: 1. I did not understand Unicode. Loading a few files into a hex editor fixed that problem. 2. The strong typing in Visual Pr...
by Loffy
5 Sep 2019 6:31
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 626

Re: integer or string to binary

I have found the issue at the heart of my problem.

Please consider this discussion thread complete.

Regards,

Loffy
by Loffy
4 Sep 2019 13:45
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 626

Re: integer or string to binary

Thomas & Mr/ms/Mrs Hooijenga, Thanks for your responses. I have tried the detailed response and it is working. My IT Professional activities go back a long way; think 1971 and assembler languages. My head is in the 8-bit byte world, hence I think in 8-bit binary's and hexadecimal, arrays/buffers/ind...
by Loffy
3 Sep 2019 8:26
Forum: Visual Prolog
Topic: integer or string to binary
Replies: 7
Views: 626

integer or string to binary

I am missing something simple again re conversion and the strong typing in Visual Prolog. I wish to load an 8 bit byte of type integer or string into a binary field/buffer. I thought I had found some predicates to do this but the strong typing is causing me problems. I have found binary concatenatio...
by Loffy
26 Aug 2019 12:31
Forum: Visual Prolog
Topic: Convert integer to hexadecimal
Replies: 4
Views: 619

Re: Convert integer to hexadecimal

Tested and working.

Just as a thought, and possibly not an elegant solution, would creating a custom symbol table domain have worked?

Regards,

Loffy
by Loffy
26 Aug 2019 12:09
Forum: Visual Prolog
Topic: Convert integer to hexadecimal
Replies: 4
Views: 619

Re: Convert integer to hexadecimal

Thank you both.

I can see reasons to use both suggestions.

Loffy
by Loffy
26 Aug 2019 6:45
Forum: Visual Prolog
Topic: Convert integer to hexadecimal
Replies: 4
Views: 619

Convert integer to hexadecimal

I wish to convert an integer number to hexadecimal. For example 255 would become a single byte FF.

Any hints?

Regards,

Loffy
by Loffy
21 Aug 2019 12:41
Forum: Visual Prolog
Topic: Rename File
Replies: 2
Views: 631

Re: Rename File

Harrison,

Thanks again.

Regards,

Loffy
by Loffy
21 Aug 2019 9:07
Forum: Visual Prolog
Topic: Rename File
Replies: 2
Views: 631

Rename File

I have tried to find a replacement for the old renamefile/2 predicate without luck so far.

Any hints?

Regards,

Loffy
by Loffy
20 Aug 2019 9:44
Forum: Visual Prolog
Topic: Undeclared identifier & Undeclared fact
Replies: 5
Views: 734

Re: Undeclared identifier & Undeclared fact

Thomas,

Thanks for your prompt response. I am now starting to understand classes better.

Regards,

Brian
by Loffy
20 Aug 2019 6:42
Forum: Visual Prolog
Topic: Undeclared identifier & Undeclared fact
Replies: 5
Views: 734

Re: Undeclared fact

Thomas, Thanks I believe I have done as you suggested, though something is still wrong, and probably stupidly wrong. In taskwindow.pro I have two lines of code that load a text file containing facts, and one line of code that saves all facts when the application is closed. These 3 lines use the file...
by Loffy
17 Aug 2019 9:48
Forum: Visual Prolog
Topic: Listener definitions
Replies: 1
Views: 615

Listener definitions

I am keen to understand the precise definitions of certain Listener events. That is, precisely when they are activated.

Some are obvious from their name. Others are not. For example "onDestroy".

Can someone please indicate where I can find all of the listener defintions?

Regards,

Loffy