Search found 47 matches
- 7 Sep 2019 13:48
- Forum: Visual Prolog
- Topic: unsigned8 bit operations
- Replies: 3
- Views: 3520
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...
- 5 Sep 2019 13:27
- Forum: Visual Prolog
- Topic: integer or string to binary
- Replies: 7
- Views: 4338
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...
- 5 Sep 2019 6:31
- Forum: Visual Prolog
- Topic: integer or string to binary
- Replies: 7
- Views: 4338
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
Please consider this discussion thread complete.
Regards,
Loffy
- 4 Sep 2019 13:45
- Forum: Visual Prolog
- Topic: integer or string to binary
- Replies: 7
- Views: 4338
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...
- 3 Sep 2019 8:26
- Forum: Visual Prolog
- Topic: integer or string to binary
- Replies: 7
- Views: 4338
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...
- 26 Aug 2019 12:31
- Forum: Visual Prolog
- Topic: Convert integer to hexadecimal
- Replies: 4
- Views: 3639
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
Just as a thought, and possibly not an elegant solution, would creating a custom symbol table domain have worked?
Regards,
Loffy
- 26 Aug 2019 12:09
- Forum: Visual Prolog
- Topic: Convert integer to hexadecimal
- Replies: 4
- Views: 3639
Re: Convert integer to hexadecimal
Thank you both.
I can see reasons to use both suggestions.
Loffy
I can see reasons to use both suggestions.
Loffy
- 26 Aug 2019 6:45
- Forum: Visual Prolog
- Topic: Convert integer to hexadecimal
- Replies: 4
- Views: 3639
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
Any hints?
Regards,
Loffy
- 21 Aug 2019 12:41
- Forum: Visual Prolog
- Topic: Rename File
- Replies: 4
- Views: 5240
Re: Rename File
Harrison,
Thanks again.
Regards,
Loffy
Thanks again.
Regards,
Loffy
- 21 Aug 2019 9:07
- Forum: Visual Prolog
- Topic: Rename File
- Replies: 4
- Views: 5240
Rename File
I have tried to find a replacement for the old renamefile/2 predicate without luck so far.
Any hints?
Regards,
Loffy
Any hints?
Regards,
Loffy
- 20 Aug 2019 9:44
- Forum: Visual Prolog
- Topic: Undeclared identifier & Undeclared fact
- Replies: 5
- Views: 3920
Re: Undeclared identifier & Undeclared fact
Thomas,
Thanks for your prompt response. I am now starting to understand classes better.
Regards,
Brian
Thanks for your prompt response. I am now starting to understand classes better.
Regards,
Brian
- 20 Aug 2019 6:42
- Forum: Visual Prolog
- Topic: Undeclared identifier & Undeclared fact
- Replies: 5
- Views: 3920
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...
- 17 Aug 2019 9:48
- Forum: Visual Prolog
- Topic: Listener definitions
- Replies: 1
- Views: 2844
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
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
- 16 Aug 2019 14:25
- Forum: Visual Prolog
- Topic: Undeclared Identifier
- Replies: 3
- Views: 3424
Re: Undeclared Identifier
Thomas and Harrison,
Thanks, and understood.
Regards,
Loffy
Thanks, and understood.
Regards,
Loffy
- 16 Aug 2019 9:37
- Forum: Visual Prolog
- Topic: Undeclared Identifier
- Replies: 3
- Views: 3424
Undeclared Identifier
Thomas, Re the error, it was in the automatic code for a dialog box. (The box was quite small with four controls: text; edit; OK; Cancel). Last night I recalled that I had reduced the size of the dialog window to more closely relate to the size of the dialogs. So I went back and enlarged the dialog ...