Procedure.l Palindrome(n.l)
Protected r.l, p.l, d.l, t.l
If n < 0
r = #False ;the "-" makes it can't be a palindrome
ElseIf n < 10
r = #True ;from 0 to 9 we do have a palindrome
Else
d = n % 10 ;get the last digit of n
p = n ;it will containt the first digit of n
t = 1
While p / 10 > 0 ;loop if p still got digits
p / 10 ;withdraws digits from the right
t * 10 ;precomputes the power of 10
Wend
;n may be a palindrome
If p = d
n = (n - p*t) / 10 ;so you withdraws the 2 digits
r = Palindrome(n) ;and you check the new n
Else
r = #False
EndIf
EndIf
ProcedureReturn r
EndProcedure
Debug Palindrome(923456789)
Debug Palindrome(923454329)