|
-
May 13th, 2000, 10:21 AM
#1
Thread Starter
New Member
I know howto do it in perl, but in VB how do you check if one variable doesn't equal another?
I've tried searching through the forums, but haven't had any luck.
Also, can someone tell me what the following is used for (inbetween the text variables)? I've seen it a lot in code examples.
Code:
Text1.Text <> Text2.Text
Thanks A lot!
-
May 13th, 2000, 11:06 AM
#2
ehehehehehe........
<> is not equals.....
like != is not equals in C, and javascript
-
May 13th, 2000, 01:11 PM
#3
Fanatic Member
...or you can look up the NOT keyword
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
May 13th, 2000, 05:07 PM
#4
Frenzied Member
I always use the Not keyword, it makes code clearer, it's the equivilent of ! in C++, so instead of
If a<>b Then
I go for
If Not (a=b) Then
for large statements good use of the Not, And (&&) and Or (||) are realy useful.
-
May 13th, 2000, 05:58 PM
#5
transcendental analytic
Which is faster, <> or not?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 13th, 2000, 07:53 PM
#6
Thread Starter
New Member
hehe
I knew the answer had to be staring me in the face
Thanks for the replies guys!
-
May 13th, 2000, 07:59 PM
#7
Fanatic Member
Originally posted by kedaman
Which is faster, <> or not?
never tested it. I imagine that in acuality they'd be about the same but if I were to bet, I'd say that 'NOT' was faster, it implies one less operation...
I imagine the difference would be difficult to detect if it in fact existed.
Paul
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
-
May 13th, 2000, 10:13 PM
#8
transcendental analytic
Ok, i've tested it got 5,03 µs as a normal for both
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 14th, 2000, 01:52 AM
#9
PowerPoster
I tested it too,
<> is faster than Not = for numbers
Not is faster than <> for strings
but the difference is really small
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|