The Dink Network

Reply to Re: Before...

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
October 15th 2018, 12:57 PM
spike.gif
SlipDink
Peasant He/Him United States bloop rumble
2nd generation. No easy way to be free. 
@Toof:
If one integer has 32 bits... I might have a clue how to access that information in other languages, but DinkC can't divide. I'm curious about this. Still, I have to admit, only 31 true/false flags out of possible 32? Meh...

Yes, I did not see how division would work for this method of data storage. I don't divide. I use subtraction mostly. I'll upload my checkbit.c code for review by those interested in the near future. Perhaps the modulo math redink1 made available would help, but I did not know about that being available in DinkC at the time I came up with my technique.

@redink1 & all others:
The technique (for 31 bits of info in a DinkC integer) I used is rather crude and computationally intensive, but it does work. (Well, it seemed to work reliably until I tried to test it again today.) In fact, it probably should not be used unless you really need a lot of binary (true/false) information so that you can make the use of this technique worthwhile compared to the overhead of the local variables needed to get my [external("checkbit", "main", &arg1, &arg2, &arg3);] logic to work.

Anyway, I had fun doing coming up with this approach (or at least deluding myself into thinking that I had come up with it), and I must admit, that was mostly the reason I did it. I looked at the "SuperVar Source" a while back (and again just this morning) and even used similar logic (dividing/multiplying by 10's) for a different part of some other code I used for "Before...", which I (of course) noted in my "credits.txt" file. You could certainly say that my binary data storage technique was inspired by that method, though (as you my guess) I wanted to take it further.

I'd be delighted if someone (who was much more mathematically inclined than I) could make the method I use more efficient within the constraints of DinkC, replacing some of the internal code within my checkbit.c module. Since there seemed to be some interest in what I did and how I did it, I'll clean up, throughly comment and release the code to the DN shortly (after I hunt down and smash a bug I just discovered in the checkbit.c module!).