Click here to Skip to main content
15,929,796 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralWord automation Pin
Anonymous14-Nov-03 8:44
Anonymous14-Nov-03 8:44 
GeneralPalindrome help. Pin
BigGreen14-Nov-03 8:24
BigGreen14-Nov-03 8:24 
GeneralRe: Palindrome help. Pin
MarkC#14-Nov-03 10:18
MarkC#14-Nov-03 10:18 
GeneralRe: Palindrome help. Pin
Ian Darling14-Nov-03 11:22
Ian Darling14-Nov-03 11:22 
GeneralRe: Palindrome help. Pin
the_warlord17-Nov-03 15:35
the_warlord17-Nov-03 15:35 
GeneralRe: Palindrome help. Pin
MarkC#19-Nov-03 3:07
MarkC#19-Nov-03 3:07 
GeneralRe: Palindrome help Pin
Jeff Varszegi14-Nov-03 11:31
professionalJeff Varszegi14-Nov-03 11:31 
GeneralSOLUTION-- DON'T READ UNLESS YOU'RE CHECKING YOUR WORK Pin
Jeff Varszegi14-Nov-03 11:35
professionalJeff Varszegi14-Nov-03 11:35 
VB
Function IsPalindrome(ByVal s As String) As Boolean
    Dim length As Integer
    Dim position As Integer

    length = s.Length

    ' You only have to check half the string against the other half
    '
    ' You might ask, What about the middle character?
    ' For an odd number of characters, the center character will not
    ' be checked because the remainder is discarded in integer division.
    ' That is all right, though, because the center char can be anything
    ' without destroying the property of palindromeness.
    For position = 0 To (length / 2)
        If (s.Chars(position) <> s.Chars((length - position) - 1)) Then
            Return False  ' This immediately exits the function
        End If
    Next position

    Return True
End Function


Regards,

Jeff Varszegi
GeneralRe: SOLUTION-- DON'T READ UNLESS YOU'RE CHECKING YOUR WORK Pin
BigGreen14-Nov-03 14:06
BigGreen14-Nov-03 14:06 
GeneralRe: SOLUTION-- DON'T READ UNLESS YOU'RE CHECKING YOUR WORK Pin
Edbert P16-Nov-03 17:58
Edbert P16-Nov-03 17:58 
GeneralRe: Palindrome help. Pin
LaptopBoy31118-Nov-03 13:10
LaptopBoy31118-Nov-03 13:10 
GeneralRe: Palindrome help. Pin
Quatl18-Nov-03 14:24
Quatl18-Nov-03 14:24 
GeneralDynamic statements / simple parser (VB.NET) Pin
MrBean14-Nov-03 7:56
MrBean14-Nov-03 7:56 
GeneralRun-time error '91': Pin
asierra14-Nov-03 6:14
asierra14-Nov-03 6:14 
GeneralRe: Run-time error '91': Pin
Dave Kreskowiak17-Nov-03 8:05
mveDave Kreskowiak17-Nov-03 8:05 
GeneralRe: Run-time error '91': Pin
asierra17-Nov-03 8:51
asierra17-Nov-03 8:51 
GeneralRe: Run-time error '91': Pin
Dave Kreskowiak17-Nov-03 15:13
mveDave Kreskowiak17-Nov-03 15:13 
Generallooking at CPU time for a process Pin
Anonymous14-Nov-03 5:48
Anonymous14-Nov-03 5:48 
GeneralRe: looking at CPU time for a process Pin
Dave Kreskowiak17-Nov-03 7:55
mveDave Kreskowiak17-Nov-03 7:55 
GeneralCreating A vc++ hook dll used in VB6 Pin
percyvimal13-Nov-03 18:52
percyvimal13-Nov-03 18:52 
Questionactivity timestamp on a file? Pin
Anonymous13-Nov-03 13:21
Anonymous13-Nov-03 13:21 
AnswerRe: activity timestamp on a file? Pin
Dave Kreskowiak17-Nov-03 7:53
mveDave Kreskowiak17-Nov-03 7:53 
GeneralApplication Data Path for VB 6 Pin
flipdoubt13-Nov-03 9:29
flipdoubt13-Nov-03 9:29 
GeneralRe: Application Data Path for VB 6 Pin
Hesham Amin13-Nov-03 10:26
Hesham Amin13-Nov-03 10:26 
QuestionCall to C++ DLL from VB??? Pin
Richard Hudson13-Nov-03 1:17
Richard Hudson13-Nov-03 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.