Unary Operators

  • Thread starter Thread starter Henry
  • Start date Start date
H

Henry

The following code came from Framework 3.5. I don't understand what the ++
operator does. I can't find any reference to the use of ++ in the VB
documentation. Comments?

Friend Function GetNextDigit() As Boolean
If (++Me.Index >= Me.len) Then
Return False
End If
Return DateTimeParse.IsDigit(Me.Value.Chars(Me.Index))
End Function
 
The following code came from Framework 3.5. I don't understand what the ++
operator does. I can't find any reference to the use of ++ in the VB
documentation. Comments?

Friend Function GetNextDigit() As Boolean
If (++Me.Index >= Me.len) Then
Return False
End If
Return DateTimeParse.IsDigit(Me.Value.Chars(Me.Index))
End Function

Not sure where you saw that code - but that will not compile in VB of any
version. My guess is that this was converted from C#, but never compiled. In
C# the ++ is the pre-increment operator (basically, increment by one and then
return the value). In VB that would look more like:

Friend Function GetNextDigit() As Boolean
Me.Index += 1
If Me.Index >= Me.len then
Return False
End If
Return DateTimeParse.IsDigit(Me.Value.Chars(Me.Index))
End Function

Or

Friend Function GetNextDigit() As Boolean
Me.Index += 1

Return If (Me.Index >= Me.Len, False, DateTimeParse.IsDigit(Me.Value.Chars(Me.Index)))
End Function

HTH
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Dick brain! WTF are you answering questions in the Classic VB group that
have nothing whatsoever to do with Classic VB. You've been infesting the
Classic VB group for some time now in your attempt to deliberately disrupt
it. Why don't you just play your silly games somewhere else, idiot.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Answered in your cross-posted thread on
microsoft.public.vb.general.discussion.

Piss off, Clark. WTF would you deliberately choose to answer a VB.Net
question in the Classic VB group when you could more easily have answered it
here where it belongs. You're a troll and you have been infesting the
Classic VB group for some time in your attempts to destroy it. Every time
you do so I will post a response here in the VB.Net group, so that they will
know what you are up to.

Mike
 
Not a problem Mike. We'll just start crossposting all Classic VB answers
here and let those chips fall where they may.

You should also stop assuming Alex is a man when her actions clearly define
her as a woman.

--
2025
If you do not believe in time travel,
your beliefs are about to be tempered.

http://www.facebook.com/group.php?gid=43606237254
| |
| > Answered in your cross-posted thread on
| > microsoft.public.vb.general.discussion.
|
| Dick brain! WTF are you answering questions in the Classic VB group that
| have nothing whatsoever to do with Classic VB. You've been infesting the
| Classic VB group for some time now in your attempt to deliberately disrupt
| it. Why don't you just play your silly games somewhere else, idiot.
|
| Mike
|
|
|
 
Back
Top