Program to determine given string is Palindrome using function
Declare function  palindrome$(a$)
CLS
INPUT "Enter a string"; (a$)
b$ = palindrome$(a$)
IF (a$ = b$) THEN
    PRINT "Given string is Palindrome"
ELSE
    PRINT "Given string is not Palindrome"
END IF
FUNCTION palindrome$ (a$)
    FOR i = LEN(a$) TO 1 STEP -1
        b$ = b$ + MID$(a$, i, 1)
    NEXT i
    palindrome$ = b$
END FUNCTION