Search found 22 matches

by Loffy
17 Sep 2019 5:46
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 123

Re: convert unsigned 64

Thanks to all.

Regards,

Loffy
by Loffy
14 Sep 2019 8:05
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 123

Re: convert unsigned 64

Martin, Thanks for the insight, though my problem seems to relate to a slightly different issue. ……... Tick = time::getTickCount, %unsigned64 bit::getUnsigned64bytes(Tick, Low, _High), ………. If I have the above two lines of code in a counter loop I get the following compile error: e504 The expression...
by Loffy
13 Sep 2019 9:44
Forum: Visual Prolog
Topic: convert unsigned 64
Replies: 5
Views: 123

Re: convert unsigned 64

Re my post above;

I only need the "Low" 32 of the unsigned64.

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

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

Re: unsigned8 bit operations

Martin,

Thanks.

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

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

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

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

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

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

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

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

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

Re: Rename File

Harrison,

Thanks again.

Regards,

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

Rename File

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

Any hints?

Regards,

Loffy