Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / How do I perform a bitstrip?

Author
Message
Manson
22
Years of Service
User Offline
Joined: 20th Oct 2002
Location: Denmark
Posted: 25th Feb 2003 01:46
For those who didn't read the topic:
How do you perform a bitstrip?
I can think of a few ways, but I don't realy wanner waste my time testing them, as I'm sure somebody has the code for it.
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 25th Feb 2003 02:45
a bitstrip?

Darken the skies, we are God.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 25th Feb 2003 03:14
depends what you mean by bitstip



no doubt you'll need those ... they're used no different to the bitshift functions in C/DBpro

dwRaven = (('R'<<16) + ('G'<<8) + 'B')

is the same as

dwRaven = ( ( bitLeft( asc( "R" ),16 ) ) + ( bitLeft( asc( "G" ),8 ) + asc( "B" ) )

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Manson
22
Years of Service
User Offline
Joined: 20th Oct 2002
Location: Denmark
Posted: 25th Feb 2003 08:59
Say if I have a variable, containing multiple I/O values, stored as 1,2,4,8,16,32,64,128,256,512,1024....
Now, to activate the functions trigered by no 8 and 16, I'll just add those numbers to the variable (8+16=24)
Or if I want to activate the 1st,2nd and 7th functions, the variable should have a value of (1+2+64=67)

Now, to read the information, you'd use a bitstrip,,,
It's a bit old-school, I know, but I need it,,,

Manson
22
Years of Service
User Offline
Joined: 20th Oct 2002
Location: Denmark
Posted: 25th Feb 2003 09:16
Never mind,,, I final discovered the 'and' function,,, Duh,,, Sorry to bother you

Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 25th Feb 2003 09:33
hmm... interesting

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?

Login to post a reply

Server time is: 2025-05-16 19:53:34
Your offset time is: 2025-05-16 19:53:34