Click here to Skip to main content
16,005,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
GeneralRe: SOLUTION-- DON'T READ UNLESS YOU'RE CHECKING YOUR WORK Pin
BigGreen14-Nov-03 14:06
BigGreen14-Nov-03 14:06 
Thanx for all the input ya'll. This is the solution that I finally came up with. I've never created my own function so, that was the part that got me. This was actually in the school book (just the function not the code) in next weeks lesson area.







Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As String
Dim b As Integer = 1
Do While b = 1
a = InputBox("Enter a word to find out if it's a Palindrome.")
If reverse(a) = a Then
MsgBox("This word is a palindrome.")
Else
MsgBox("This word is not a palindrome.")
End If
If a = "z" Then
b = b + 1
End If
Loop
End Sub
Function reverse(ByVal info As String) As String
Dim m, j As Integer, temp As String = ""
m = info.Length
For j = m - 1 To 0 Step -1
temp &= info.Substring(j, 1)
Next
Return temp
End Function


A lot of this is not really necessary however, I figured it was a good chance for a lil practice.


Thanx again for all the input Big Grin | :-D

P.S. Sorry about the Lounge post that was my second post here and I was in a rush so didn't read the rules :P won't happen again Wink | ;)
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 
AnswerRe: Call to C++ DLL from VB??? Pin
Chris Meech14-Nov-03 8:52
Chris Meech14-Nov-03 8:52 

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.