|
-
Sep 1st, 2000, 02:27 AM
#1
Thread Starter
Lively Member
How do you do "is NOT equal to"?
if blah != blah then
blah
end if
??????
___________________________
Chris
-
Sep 1st, 2000, 02:39 AM
#2
Frenzied Member
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Sep 1st, 2000, 02:41 AM
#3
equal to
== or =
not equal to
<> or ><
greater
>
greater or equal
>=
less
<
less or equal
<=
-
Sep 1st, 2000, 05:08 AM
#4
Conquistador
yeah, it is <>
or you could do
Code:
If Not myNum1 = myNum2 Then
-
Sep 1st, 2000, 05:21 AM
#5
Fanatic Member
Originally posted by Edneeis
equal to
== or =
You're thinking of C++
VB only supports =
It uses it as both an assignment operator and a truth operator.
Just clearing that up.
-
Sep 1st, 2000, 05:39 AM
#6
Fanatic Member
Even:
Code:
If Not (Blah = Blah) then
blah
End If
r0ach™
Don't forget to rate the post
-
Sep 1st, 2000, 09:43 PM
#7
Conquistador
ok, I think we might be confusing some people now!
-
Sep 2nd, 2000, 05:48 AM
#8
Originally posted by V(ery) Basic
VB only supports =
It uses it as both an assignment operator and a truth operator.
Actually (to be ridiculously precise) VB lacks an assignment operator.
VB assigns values with the Let keyword accompanied with the equal sign.
But since the early days of BASIC the Let keyword kan be omitted. So we usually just type:
But that doesn't make the equal sign an assignment operator.
Because of VB's lack of an assignment operator assignments can only be done in the beginning of a statement and not in the middle.
-
Sep 2nd, 2000, 06:59 AM
#9
Fanatic Member
The Let statement is medieval.
Try also using:
Code:
If (variable) Then ... Else ...
'instead of:
If (variable <> 0) Then ... Else ...
This boolean notation uses less code and executes faster.
-
Sep 4th, 2000, 02:13 AM
#10
Conquistador
[quote]
The Let statement is medieval.
Try also using:
code:-------------------------------------------------------------------------------- If (variable) Then ... Else ...
'instead of:
If (variable <> 0) Then ... Else ...
--------------------------------------------------------------------------------
This boolean notation uses less code and executes faster.
[\quote]
the boolean would only show true, and could not be used for comparison?
-
Sep 4th, 2000, 12:41 PM
#11
Fanatic Member
Yes, unfortunately, no comparison. But you can use this notation also when using the result from a Function as the boolean test.
If (Do_The_Test()) Then ...
-
Sep 5th, 2000, 03:04 AM
#12
Conquistador
yeah, but he was asking for the function of not equal to,
not true or false!
-
Sep 5th, 2000, 01:06 PM
#13
Fanatic Member
All right silvy, I was just mentioning this by increasing my replies. I want to be a guru too, you know?
-
Sep 6th, 2000, 04:36 AM
#14
Conquistador
yeah i know, but did you know, John (the administrator) has to make you a guru, based on your ability to post good helpful posts!
-
Sep 6th, 2000, 12:36 PM
#15
Fanatic Member
-
Sep 7th, 2000, 12:32 AM
#16
Conquistador
bad luck i don't think so
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
|