RosettaCodeData/Task/Palindrome-detection/NetRexx/palindrome-detection.netrexx

18 lines
518 B
Plaintext

y='In girum imus nocte et consumimur igni'
-- translation: We walk around in the night and
-- we are burnt by the fire (of love)
say
say 'string = 'y
say
pal=isPal(y)
if pal==0 then say "The string isn't palindromic."
else say 'The string is palindromic.'
method isPal(x) static
x=x.upper().space(0) /* removes all blanks (spaces) */
/* and translate to uppercase. */
return x==x.reverse() /* returns 1 if exactly equal */