Unsigned variables

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Unsigned variables

Post by wilbert »

Why put energy into a discussion like this about releasing source code.
Every one is free to do so or not.

It's better to explain what unsigned procedures are required and if both x86 and x64 are required or only one of them.
It's not that complicated to write them since asm has support for both signed and unsigned values.
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Unsigned variables

Post by StarBootics »

wilbert wrote:It's not that complicated to write them since asm has support for both signed and unsigned values.
It's probably true if you know how to write ASM code ! Unfortunately for me, my knowledge of asm programming is between 0 and nothing.
In almost case, if I have a code example, I'm able to adapt it to fit my needs.

Do you see the problem ?

Regards
StarBootics
The Stone Age did not end due to a shortage of stones !
ozzie
Enthusiast
Enthusiast
Posts: 443
Joined: Sun Apr 06, 2008 12:54 pm
Location: Brisbane, Qld, Australia
Contact:

Re: Unsigned variables

Post by ozzie »

+1 for unsigned longs, etc.

But in the interests of sharing code, I'll add a posting to "Tricks 'n' Tips" for my solution to a need that came up a few days ago. I needed to pass a key to an external procedure where the key is derived from an algorithm that uses lrotl (long rotate left) several times. So I wrote my own lrotl procedure in PB (not ASM). I had to specifically code for negatives as >> on an negative long propagates the sign bit.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Unsigned variables

Post by Little John »

BorisTheOld wrote:
StarBootics wrote:Why not ?
Because it's part of my programming "toolkit", carefully crafted over the past 50 years to allow me to make a modest living using the talent that the Gods have bestowed upon me.
No comment.
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Re: Unsigned variables

Post by chris319 »

We have 1- and 2-byte unsigned variables.

That leaves 4 bytes and 8 bytes. We're already half-way there.

For whatever reason, the PB team has decided to go only half way.
Post Reply