请教10000到99999的对称数代码
请教10000到99999的对称数程序代码,新人求助
CREATE CURSOR dcheng(对称 N(6))
FOR j=10000 TO 99999
IF Symmetry(j)=.t.
INSERT INTO dcheng(对称) VALUES(j)
ENDIF
ENDFOR
BROWSE
*!* 如果对称返回 .T.
FUNCTION Symmetry(eExpression)
LOCAL nLen,cStr,i
eExpression = TRANSFORM(eExpression)
nLen = LEN(eExpression)
cStr = ""
FOR i =1 TO nLen
cStr = cStr + SUBSTR(eExpression,nLen - i + 1,1)
ENDFOR
RETURN IIF(cStr = eExpression,.t.,.f.)
ENDFUNC