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.

Newcomers DBPro Corner / is there a no-match symbol ?

Author
Message
primevest
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: somewhere on the world
Posted: 1st Dec 2007 01:55 Edited at: 1st Dec 2007 01:55
you have the bigger symbol ( > )
the smaller symbol ( < )
the match symbol ( = )
but is there also a no-match symbol ?

its for this command :



i want that . if it reads "end_cood" that the file will close.
so does someone know the no-match symbol ?
Guyra
18
Years of Service
User Offline
Joined: 10th Nov 2005
Location: Norway
Posted: 1st Dec 2007 02:13 Edited at: 1st Dec 2007 02:14
...
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 1st Dec 2007 02:41
if NOT...

This may be buggy I dont know...

"I'm a firm believer that if a team scores one goal, then the other has to score two to win."
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 1st Dec 2007 03:01
Use <>

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers
gbark
18
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 1st Dec 2007 04:06 Edited at: 1st Dec 2007 04:06
Yep, using <> is the most generally accepted way of writing "does not equal" in DarkBASIC.

I've never used NOT in IF statements, I'm guessing that could also work but I've heard of some people having problems using it that way.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Dec 2007 04:57
I tried to use NOT in some cases in my Text Adventure, but it was never recognized. So that doesn't work.

Just use <>, I have used that before, and it does work, even on strings.


"Fire is always at the top of the food chain, and it has a big appetite."
Guyra
18
Years of Service
User Offline
Joined: 10th Nov 2005
Location: Norway
Posted: 1st Dec 2007 05:42
That was what I though, <>. Deleted it though, as I was unsure.
primevest
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: somewhere on the world
Posted: 1st Dec 2007 12:57
oke thnx
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Dec 2007 15:32
Actually I've been thinking about this, and I realized it's probably easier to just use a REPEAT-UNTIL loop:




[i"I don't have a Christmas tree, I have a Chemis-tree."[/i]
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 1st Dec 2007 17:36
I once heard that the NOT function had a bug within DBPro. It would only work well with booleans.

Further on my stuff at...
TurboSquid.com
The3dStudio.com
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st Dec 2007 17:41
NOT is completely unrelated to <>.

NOT inverses the bits of a value.
<> is a logical operator meaning "not equal to".

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 1st Dec 2007 17:50
I believe NOT would work like, NOT 3 > 2. 3 > 2 = true, the NOT just turns it into false.

"It's like floating a boat on a liquid that I don't know, but I'm quite happy to drink it if I'm thirsty enough" - Me being a good programmer but sucking at computers

Login to post a reply

Server time is: 2024-09-27 08:31:05
Your offset time is: 2024-09-27 08:31:05