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 / bit operators & (AND) | (OR)

Author
Message
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Jan 2007 10:00 Edited at: 10th Jan 2007 11:47
I just discovered that there are at least 2 bit testing operators: & |(the pipe character) for DBC.

I have looked and looked but have not found any documentation indicating that they exist. Does anyone know if these are the only ones or if there are others? Here's some code I ran to test that these were indeed binary AND and OR:



This link has some info...
http://forum.thegamecreators.com/?m=forum_view&t=30402&b=10

Enjoy your day.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Jan 2007 14:24
I'm pretty sure that XOR doesn't exist in DBC - the post may have been referring to DBP only.

TDK_Man

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Jan 2007 18:05
Thanks TDK_MAN

I should've tested out the ! as XOR after I read the post it. It doesn't seem to work.

Enjoy your day.
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 7th Jan 2007 17:20 Edited at: 7th Jan 2007 17:21
! seems to work as a not sign.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Jan 2007 19:43
Quote: "! seems to work as a not sign."


Are you sure? The following doesn't work in DBC...



You did remember that this was the DBC board not the DBPro board right?...

TDK_Man

Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th Jan 2007 22:53
TDK:



TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Jan 2007 00:28
Hmm... OK.

It's not used the 'Delphi' way (the way I tried it) and it's not in the help files.

I just learnt something new - but at least it works! Kudos Robot.

TDK_Man

Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 8th Jan 2007 07:05
I dont think the manual mentions use of shortcut operators.
although I could be wrong ??

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Jan 2007 11:57
@Bluestar4

I haven't been able to find anything on binary operators in the manual. There's only the mention of two boolean operators AND , OR that don't test/switch the on and off positions of individual bits, but just the truth of conditonal statements.


! is NOT.

cool.

Thanks everyone.

Any others for DBC?

Enjoy your day.

Login to post a reply

Server time is: 2025-05-26 02:40:32
Your offset time is: 2025-05-26 02:40:32