A very simple program that I wrote using Microsoft Visual Foxpro 9 that will ask the user to give a word and a string and then our program will check if the given word or string is a Palindrome or Not a Palindrome. I provided also a an error checking code if the textbox if empty.
I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My telephone number at home here in Bacolod City, Negros Occidental is (034) 4335675.
Sample Program Output
Program Listing
Object: Form1 Procedure: Init
===================================
thisform.text1.Value=""
Check Button
Object: Command1 Procedure: Click
===================================
&& Palindrome Program in Visual Foxpro
&& Written By Mr. Jake R. Pomperada, MAED-IT
&& February 20, 2018 Tuesday
LOCAL StrOriginal, StrReverse
StrOriginal=allTRIM(UPPER(thisform.text1.value))
StrReverse=""
FOR StrCount=LEN(StrOriginal) TO 1 STEP -1
StrReverse=ALLTRIM(UPPER(StrReverse))+SUBSTR(StrOriginal,StrCount,1)
ENDFOR
IF EMPTY(thisform.text1.Value) then
MESSAGEBOX("Can't be empty.",64,"Reminder")
thisform.text1.SetFocus
RETURN .t.
endif
IF (StrReverse == StrOriginal) then
thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " is a Palindrome."
ELSE
thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " Not a Palindrome."
ENDIF
Clear Button
Object: Command2 Procedure: Click
===================================
WITH thisform
.text1.value=""
.label1.caption=""
.text1.setfocus
endwith
Quit Button
Object: Command3 Procedure: Click
===================================
thisform.Release