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 Professional Discussion / Right Shifting Bits

Author
Message
Scene Commander
Support Manager
18
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 11th Nov 2010 20:51
I need to right shift the bits of numbers for a project and was fairly certain the I've seen a DBP command for this but can't seem to find it. I'm now wondering if it was in another unoffical Dll. #

Can anyone tell me if such a command exists.

http://jimjamsgames.yolasite.com
Lost in Thought
22
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 11th Nov 2010 21:58
>> is what is used for bitshift right. << is bit shift left.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Nov 2010 21:59
In the DBPro editor browse to

Help>DarkBASIC Professional Help>Principles>Operators

and scroll down to BITWISE OPERATORS.

Sample code:

Scene Commander
Support Manager
18
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 12th Nov 2010 08:09
Thanks both of you, very clear explanations. I should have realised that, I just had it stuck in my head there was an actual command.

http://jimjamsgames.yolasite.com

Login to post a reply

Server time is: 2026-07-21 18:58:13
Your offset time is: 2026-07-21 18:58:13